@@ -97,11 +97,19 @@ static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *ou
97
97
x = self -> absolute_transform -> x + self -> absolute_transform -> dx * self -> y ;
98
98
y = self -> absolute_transform -> y + self -> absolute_transform -> dy * self -> x ;
99
99
area_transpose (out_area );
100
- displayio_area_canon (out_area );
101
100
} else {
101
+ if (self -> absolute_transform -> dx < 1 ) {
102
+ out_area -> x1 = out_area -> x1 * -1 + 1 ;
103
+ out_area -> x2 = out_area -> x2 * -1 + 1 ;
104
+ }
105
+ if (self -> absolute_transform -> dy < 1 ) {
106
+ out_area -> y1 = out_area -> y1 * -1 + 1 ;
107
+ out_area -> y2 = out_area -> y2 * -1 + 1 ;
108
+ }
102
109
x = self -> absolute_transform -> x + self -> absolute_transform -> dx * self -> x ;
103
110
y = self -> absolute_transform -> y + self -> absolute_transform -> dy * self -> y ;
104
111
}
112
+ displayio_area_canon (out_area );
105
113
displayio_area_shift (out_area , x , y );
106
114
107
115
VECTORIO_SHAPE_DEBUG (" out:{(%5d,%5d), (%5d,%5d)}\n" , out_area -> x1 , out_area -> y1 , out_area -> x2 , out_area -> y2 );
@@ -313,10 +321,10 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ
313
321
VECTORIO_SHAPE_PIXEL_DEBUG (" a(%3d, %3d)" , pixel_to_get_x , pixel_to_get_y );
314
322
315
323
if (self -> absolute_transform -> mirror_x ) {
316
- pixel_to_get_x = shape_area .x2 - 1 - (pixel_to_get_x - shape_area .x1 );
324
+ pixel_to_get_x = ( shape_area .x2 - shape_area . x1 ) - (pixel_to_get_x + shape_area .x1 ) + shape_area . x1 - 1 ;
317
325
}
318
326
if (self -> absolute_transform -> mirror_y ) {
319
- pixel_to_get_y = shape_area .y2 - 1 - (pixel_to_get_y - shape_area .y1 );
327
+ pixel_to_get_y = ( shape_area .y2 - shape_area . y1 ) - (pixel_to_get_y + shape_area .y1 ) + + shape_area . y1 - 1 ;
320
328
}
321
329
}
322
330
0 commit comments