Skip to content

fix(vg_lite): fix clip corner image display error#5517

Merged
FASTSHIFT merged 1 commit intolvgl:masterfrom
FASTSHIFT:fix_vg_lite_clip_corner
Jan 29, 2024
Merged

fix(vg_lite): fix clip corner image display error#5517
FASTSHIFT merged 1 commit intolvgl:masterfrom
FASTSHIFT:fix_vg_lite_clip_corner

Conversation

@FASTSHIFT
Copy link
Collaborator

Description of the feature or fix

void test_demo()
{
    lv_obj_t* main_obj = lv_obj_create(lv_scr_act());
    lv_obj_add_flag(main_obj, LV_OBJ_FLAG_IGNORE_LAYOUT);
    lv_obj_set_style_pad_all(main_obj, 0, 0);
    lv_obj_set_style_radius(main_obj, 50, 0);
    lv_obj_set_style_clip_corner(main_obj, true, 0);
    lv_obj_set_style_bg_color(main_obj, lv_palette_main(LV_PALETTE_BLUE), 0);
    lv_obj_set_width(main_obj, 160);
    lv_obj_set_pos(main_obj, 20, 10);

    lv_obj_t* img = lv_image_create(main_obj);
    lv_image_set_src(img, "A:lvgl/examples/libs/libjpeg_turbo/flower.jpg");
}

Before:
image

After:
image

Notes

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
@FASTSHIFT FASTSHIFT changed the title fix(vg_lite): The clip corner image displays abnormally fix(vg_lite): fix clip corner image display error Jan 29, 2024
@FASTSHIFT FASTSHIFT merged commit 019aa8d into lvgl:master Jan 29, 2024
@kisvegabor
Copy link
Member

On the "after" image the the radius of the background ans image are not perfectly the same.

@FASTSHIFT
Copy link
Collaborator Author

On the "after" image the the radius of the background ans image are not perfectly the same.

This may be caused by the inconsistency between thorvg's corner rounding algorithm and lvgl, which is not obvious on the device.

@FASTSHIFT FASTSHIFT deleted the fix_vg_lite_clip_corner branch January 30, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants