Problem about lv_example_style_15()

Hello everyone,

When I try the lv_example_style_15 () with LVGL v8.3.1 in windows simulator, I found the transform feature doesn’t work.
If use lv_obj_set_style_opa() or lv_obj_set_style_transform_angle(), the button disappears.

Doc link: Styles — LVGL documentation

Can you give any suggestion about using transform feature?

You have to enable LV_COLOR_SCREEN_TRANSP.

Thanks, Kisvegabor. It works.
LVGL is really powerful, your contribution is great.
And I will consider joining this project if I have time, to contribute a little.

Hi, Kisvegabor,

When I enable LV_COLOR_SCREEN_TRANSP, another problem happens.
My project based on lvgl 8.3.1 becomes black except the changing part of the screen.

If comment out lv_obj_create(NULL), lv_scr_load from my project, it works well.
Or use full_refresh mode, also can solve it, but performance is low.

Is there any special for the default screen?
Can you give any suggestion?

Can you update to v8.3.3? I believe it’s already fixed.

Hi, I have updated to v8.3.3, but the problem keeps the same. I have found the reason, that’s because I assign “round corner” style to the screen. My previous code maybe like this:

    lv_obj_t* pLvObj = lv_obj_create(NULL);

    lv_style_t* pLvStyle = (lv_style_t *)malloc(sizeof(lv_style_t));
    lv_style_set_radius(pLvStyle, 7);
    lv_obj_add_style(pLvObj, pLvStyle, 0);


It would make such a problem. You can reproduce it with any existing lv example.

Adding rounded corner to the screen can cause some complications. Why do you need it?

Sorry, not me need it, it is added by accident, from a very big C++ inherit tree.

So without it it’s working well?

Sure. Works very well.

1 Like

Hi @kisvegabor , I found the rotation angle 90, 180, 270 will blur the label very much.
It should be resulted by the lv_trigo_sin(), precision is not enough.
For the special angle, 0, 90, 180, 270, rotation can be very simple pixel moving, no need to run the real rotation algorithm, I think we can optimize these scenarios specially.
How do you think?

I’d like take look why it is blurred. Could you open an issue on GitHub to be sure it won’t be forgotten.

1 Like

Sure. Please check Transformation for 90,180,270 degrees will make label text blurred. · Issue #3777 · lvgl/lvgl (