@@ -959,7 +959,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_circle_obj, 0, bitmaptools_obj_draw_
959959//| y1: int,
960960//| x2: int,
961961//| y2: int,
962- //| skip_index : int,
962+ //| skip_source_index : int,
963963//| skip_dest_index: int
964964//| ) -> None:
965965//| """Inserts the source_bitmap region defined by rectangular boundaries
@@ -975,14 +975,14 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_circle_obj, 0, bitmaptools_obj_draw_
975975//| :param int y1: Minimum y-value for rectangular bounding box to be copied from the source bitmap
976976//| :param int x2: Maximum x-value (exclusive) for rectangular bounding box to be copied from the source bitmap
977977//| :param int y2: Maximum y-value (exclusive) for rectangular bounding box to be copied from the source bitmap
978- //| :param int skip_index : bitmap palette index in the source that will not be copied,
978+ //| :param int skip_source_index : bitmap palette index in the source that will not be copied,
979979//| set to None to copy all pixels
980980//| :param int skip_dest_index: bitmap palette index in the destination bitmap that will not get overwritten
981981//| by the pixels from the source"""
982982//| ...
983983//|
984984STATIC mp_obj_t bitmaptools_obj_blit (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
985- enum {ARG_destination , ARG_source , ARG_x , ARG_y , ARG_x1 , ARG_y1 , ARG_x2 , ARG_y2 , ARG_skip_index , ARG_skip_dest_index };
985+ enum {ARG_destination , ARG_source , ARG_x , ARG_y , ARG_x1 , ARG_y1 , ARG_x2 , ARG_y2 , ARG_skip_source_index , ARG_skip_dest_index };
986986 static const mp_arg_t allowed_args [] = {
987987 {MP_QSTR_dest_bitmap , MP_ARG_REQUIRED | MP_ARG_OBJ , {.u_obj = MP_OBJ_NULL } },
988988 {MP_QSTR_source_bitmap , MP_ARG_REQUIRED | MP_ARG_OBJ , {.u_obj = MP_OBJ_NULL } },
@@ -992,7 +992,7 @@ STATIC mp_obj_t bitmaptools_obj_blit(size_t n_args, const mp_obj_t *pos_args, mp
992992 {MP_QSTR_y1 , MP_ARG_KW_ONLY | MP_ARG_INT , {.u_int = 0 } },
993993 {MP_QSTR_x2 , MP_ARG_KW_ONLY | MP_ARG_OBJ , {.u_obj = mp_const_none } }, // None convert to source->width
994994 {MP_QSTR_y2 , MP_ARG_KW_ONLY | MP_ARG_OBJ , {.u_obj = mp_const_none } }, // None convert to source->height
995- {MP_QSTR_skip_index , MP_ARG_KW_ONLY | MP_ARG_OBJ , {.u_obj = mp_const_none } },
995+ {MP_QSTR_skip_source_index , MP_ARG_KW_ONLY | MP_ARG_OBJ , {.u_obj = mp_const_none } },
996996 {MP_QSTR_skip_dest_index , MP_ARG_KW_ONLY | MP_ARG_OBJ , {.u_obj = mp_const_none } },
997997 };
998998 mp_arg_val_t args [MP_ARRAY_SIZE (allowed_args )];
@@ -1045,15 +1045,15 @@ STATIC mp_obj_t bitmaptools_obj_blit(size_t n_args, const mp_obj_t *pos_args, mp
10451045 y1 = temp ;
10461046 }
10471047
1048- uint32_t skip_index ;
1049- bool skip_index_none ; // flag whether skip_value was None
1048+ uint32_t skip_source_index ;
1049+ bool skip_source_index_none ; // flag whether skip_value was None
10501050
1051- if (args [ARG_skip_index ].u_obj == mp_const_none ) {
1052- skip_index = 0 ;
1053- skip_index_none = true;
1051+ if (args [ARG_skip_source_index ].u_obj == mp_const_none ) {
1052+ skip_source_index = 0 ;
1053+ skip_source_index_none = true;
10541054 } else {
1055- skip_index = mp_obj_get_int (args [ARG_skip_index ].u_obj );
1056- skip_index_none = false;
1055+ skip_source_index = mp_obj_get_int (args [ARG_skip_source_index ].u_obj );
1056+ skip_source_index_none = false;
10571057 }
10581058
10591059 uint32_t skip_dest_index ;
@@ -1067,7 +1067,7 @@ STATIC mp_obj_t bitmaptools_obj_blit(size_t n_args, const mp_obj_t *pos_args, mp
10671067 skip_dest_index_none = false;
10681068 }
10691069
1070- common_hal_bitmaptools_blit (destination , source , x , y , x1 , y1 , x2 , y2 , skip_index , skip_index_none , skip_dest_index ,
1070+ common_hal_bitmaptools_blit (destination , source , x , y , x1 , y1 , x2 , y2 , skip_source_index , skip_source_index_none , skip_dest_index ,
10711071 skip_dest_index_none );
10721072
10731073 return mp_const_none ;
0 commit comments