@@ -111,14 +111,16 @@ STATIC void validate_clip_region(displayio_bitmap_t *bitmap, mp_obj_t clip0_tupl
111
111
112
112
//|
113
113
//| def rotozoom(
114
- //| dest_bitmap: displayio.Bitmap, ox: int, oy: int,
115
- //| dest_clip0: Tuple[int, int], dest_clip1: Tuple[int, int],
116
- //| source_bitmap: displayio.Bitmap, px: int, py: int, source_clip0: Tuple[int, int], source_clip1: Tuple[int, int],
114
+ //| dest_bitmap: displayio.Bitmap, source_bitmap: displayio.Bitmap,
115
+ //| *,
116
+ //| ox: int, oy: int, dest_clip0: Tuple[int, int], dest_clip1: Tuple[int, int],
117
+ //| px: int, py: int, source_clip0: Tuple[int, int], source_clip1: Tuple[int, int],
117
118
//| angle: float, scale: float, skip_index: int) -> None:
118
119
//| """Inserts the source bitmap region into the destination bitmap with rotation
119
120
//| (angle), scale and clipping (both on source and destination bitmaps).
120
121
//|
121
- //| :param bitmap dest_bitmap: The bitmap that will be copied into
122
+ //| :param bitmap dest_bitmap: Destination bitmap that will be copied into
123
+ //| :param bitmap source_bitmap: Source bitmap that contains the graphical region to be copied
122
124
//| :param int ox: Horizontal pixel location in destination bitmap where source bitmap
123
125
//| point (px,py) is placed
124
126
//| :param int oy: Vertical pixel location in destination bitmap where source bitmap
@@ -127,7 +129,6 @@ STATIC void validate_clip_region(displayio_bitmap_t *bitmap, mp_obj_t clip0_tupl
127
129
//| region that constrains region of writing into destination bitmap
128
130
//| :param Tuple[int,int] dest_clip1: Second corner of rectangular destination clipping
129
131
//| region that constrains region of writing into destination bitmap
130
- //| :param bitmap source_bitmap: Source bitmap that contains the graphical region to be copied
131
132
//| :param int px: Horizontal pixel location in source bitmap that is placed into the
132
133
//| destination bitmap at (ox,oy)
133
134
//| :param int py: Vertical pixel location in source bitmap that is placed into the
@@ -143,19 +144,20 @@ STATIC void validate_clip_region(displayio_bitmap_t *bitmap, mp_obj_t clip0_tupl
143
144
//| ...
144
145
//|
145
146
STATIC mp_obj_t bitmaptools_obj_rotozoom (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ){
146
- enum {ARG_dest_bitmap , ARG_ox , ARG_oy , ARG_dest_clip0 , ARG_dest_clip1 ,
147
- ARG_source_bitmap , ARG_px , ARG_py ,
148
- ARG_source_clip0 , ARG_source_clip1 ,
147
+ enum {ARG_dest_bitmap , ARG_source_bitmap ,
148
+ ARG_ox , ARG_oy , ARG_dest_clip0 , ARG_dest_clip1 ,
149
+ ARG_px , ARG_py , ARG_source_clip0 , ARG_source_clip1 ,
149
150
ARG_angle , ARG_scale , ARG_skip_index };
150
151
151
152
static const mp_arg_t allowed_args [] = {
152
153
{MP_QSTR_dest_bitmap , MP_ARG_REQUIRED | MP_ARG_OBJ },
154
+ {MP_QSTR_source_bitmap , MP_ARG_REQUIRED | MP_ARG_OBJ },
155
+
153
156
{MP_QSTR_ox , MP_ARG_KW_ONLY | MP_ARG_OBJ , {.u_obj = mp_const_none } }, // None convert to destination->width / 2
154
157
{MP_QSTR_oy , MP_ARG_KW_ONLY | MP_ARG_OBJ , {.u_obj = mp_const_none } }, // None convert to destination->height / 2
155
158
{MP_QSTR_dest_clip0 , MP_ARG_KW_ONLY | MP_ARG_OBJ , {.u_obj = mp_const_none } },
156
159
{MP_QSTR_dest_clip1 , MP_ARG_KW_ONLY | MP_ARG_OBJ , {.u_obj = mp_const_none } },
157
160
158
- {MP_QSTR_source_bitmap , MP_ARG_REQUIRED | MP_ARG_OBJ },
159
161
{MP_QSTR_px , MP_ARG_KW_ONLY | MP_ARG_OBJ , {.u_obj = mp_const_none } }, // None convert to source->width / 2
160
162
{MP_QSTR_py , MP_ARG_KW_ONLY | MP_ARG_OBJ , {.u_obj = mp_const_none } }, // None convert to source->height / 2
161
163
{MP_QSTR_source_clip0 , MP_ARG_KW_ONLY | MP_ARG_OBJ , {.u_obj = mp_const_none } },
0 commit comments