@@ -184,7 +184,8 @@ STATIC mp_obj_t bitmap_subscr(mp_obj_t self_in, mp_obj_t index_obj, mp_obj_t val
184184//| : param int y1: Minimum y-value for rectangular bounding box to be copied from the source bitmap
185185//| : param int x2: Maximum x-value for rectangular bounding box to be copied from the source bitmap
186186//| : param int y2: Maximum y-value for rectangular bounding box to be copied from the source bitmap
187- //| : param int skip_index: bitmap palette index in the source that will not be copied, set `None` to copy all pixels
187+ //| : param int skip_index: bitmap palette index in the source that will not be copied,
188+ //| set `None` to copy all pixels"""
188189//| ...
189190//|
190191
@@ -229,19 +230,17 @@ STATIC mp_obj_t displayio_bitmap_obj_blit(size_t n_args, const mp_obj_t *pos_arg
229230 y2 = mp_obj_get_int (args [ARG_y2 ].u_obj );
230231 }
231232
232-
233233 // Check x,y are within self (target) bitmap boundary
234234 if ( (x < 0 ) || (y < 0 ) || (x > self -> width ) || (y > self -> height ) ) {
235235 mp_raise_ValueError (translate ("(x,y): out of range of target bitmap" ));
236236 }
237237 // Check x1,y1,x2,y2 are within source bitmap boundary
238- if ( (x1 < 0 ) || (x1 > source -> width ) ||
239- (y1 < 0 ) || (y1 > source -> height ) ||
238+ if ( (x1 < 0 ) || (x1 > source -> width ) ||
239+ (y1 < 0 ) || (y1 > source -> height ) ||
240240 (x2 < 0 ) || (x2 > source -> width ) ||
241241 (y2 < 0 ) || (y2 > source -> height ) ) {
242242 mp_raise_ValueError (translate ("(x1,y1) or (x2,y2): out of range of source bitmap" ));
243243 }
244-
245244 // Ensure x1 < x2 and y1 < y2
246245 if (x1 > x2 ) {
247246 int16_t temp = x2 ;
@@ -254,7 +253,7 @@ STATIC mp_obj_t displayio_bitmap_obj_blit(size_t n_args, const mp_obj_t *pos_arg
254253 y1 = temp ;
255254 }
256255
257- uint32_t skip_index ;
256+ uint32_t skip_index ;
258257 bool skip_index_none ; // flag whether skip_value was None
259258
260259 if (args [ARG_skip_index ].u_obj == mp_const_none ) {
@@ -263,7 +262,7 @@ STATIC mp_obj_t displayio_bitmap_obj_blit(size_t n_args, const mp_obj_t *pos_arg
263262 } else {
264263 skip_index = mp_obj_get_int (args [ARG_skip_index ].u_obj );
265264 skip_index_none = false;
266- }
265+ }
267266
268267 common_hal_displayio_bitmap_blit (self , x , y , source , x1 , y1 , x2 , y2 , skip_index , skip_index_none );
269268
0 commit comments