File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -434,11 +434,15 @@ The logo is black, with anti-aliasing and transparency. You can now manipulate t
434434logo.set_style_img_recolor_opa(255, lv.PART_MAIN | lv.STATE_DEFAULT)
435435logo.set_style_img_recolor(lv.color(lv.COLOR_WHITE), lv.PART_MAIN | lv.STATE_DEFAULT)
436436
437+ # set the center point of the image as the reference for zoom and rotation
438+ logo.set_style_transform_pivot_x(32, lv.PART_MAIN | lv.STATE_DEFAULT)
439+ logo.set_style_transform_pivot_y(32, lv.PART_MAIN | lv.STATE_DEFAULT)
440+
437441# zoom by 125% - 100% is 256, so 125% is 320
438- logo.set_zoom(300 )
442+ logo.set_style_transform_scale(320, lv.PART_MAIN | lv.STATE_DEFAULT )
439443
440444# rotate by 30 degrees - or 300 deci-degrees
441- logo.set_angle (300)
445+ logo.set_style_transform_rotation (300, lv.PART_MAIN | lv.STATE_DEFAULT )
442446```
443447
444448![ screenshot-1618843394] ( https://user-images.githubusercontent.com/49731213/115389410-5886b680-a1dd-11eb-9b9f-bb901268aeec.png )
You can’t perform that action at this time.
0 commit comments