@@ -970,6 +970,7 @@ static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(vertex2ii_obj, 3, 5, _vertex2ii);
970
970
{ MP_ROM_QSTR(MP_QSTR_PaletteSource), MP_ROM_PTR(&palettesource_obj) }, \
971
971
{ MP_ROM_QSTR(MP_QSTR_PaletteSourceH), MP_ROM_PTR(&palettesourceh_obj) }, \
972
972
{ MP_ROM_QSTR(MP_QSTR_PointSize), MP_ROM_PTR(&pointsize_obj) }, \
973
+ { MP_ROM_QSTR(MP_QSTR_Region), MP_ROM_PTR(®ion_obj) }, \
973
974
{ MP_ROM_QSTR(MP_QSTR_RestoreContext), MP_ROM_PTR(&restorecontext_obj) }, \
974
975
{ MP_ROM_QSTR(MP_QSTR_Return), MP_ROM_PTR(&return_obj) }, \
975
976
{ MP_ROM_QSTR(MP_QSTR_SaveContext), MP_ROM_PTR(&savecontext_obj) }, \
@@ -1061,8 +1062,29 @@ static mp_obj_t _pointsize(mp_obj_t self, mp_obj_t a0) {
1061
1062
common_hal__eve_PointSize (EVEHAL (self ), size );
1062
1063
return mp_const_none ;
1063
1064
}
1065
+
1064
1066
static MP_DEFINE_CONST_FUN_OBJ_2 (pointsize_obj , _pointsize ) ;
1065
1067
1068
+ //| def Region(self, y: int, h: int, dest: int) -> None:
1069
+ //| """Specify a cull region in the display list
1070
+ //|
1071
+ //| :param int y: Starting Y band in the render buffer. Range 0-63
1072
+ //| :param int h: Y height in the render buffer. Range 0-63
1073
+ //| :param int dest: destination address in the display list if the raster is outside the region
1074
+ //|
1075
+ //| """
1076
+ //| ...
1077
+ //|
1078
+
1079
+ static mp_obj_t _region (size_t n_args , const mp_obj_t * args ) {
1080
+ uint32_t y = mp_obj_get_int_truncated (args [1 ]);
1081
+ uint32_t h = mp_obj_get_int_truncated (args [2 ]);
1082
+ uint32_t dest = mp_obj_get_int_truncated (args [3 ]);
1083
+ common_hal__eve_Region (EVEHAL (args [0 ]), y , h , dest );
1084
+ return mp_const_none ;
1085
+ }
1086
+ static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (region_obj , 4 , 4 , _region ) ;
1087
+
1066
1088
//| def VertexTranslateX(self, x: float) -> None:
1067
1089
//| """Set the vertex transformation's x translation component
1068
1090
//|
0 commit comments