API for controlling specific corner radiuses

A natural extension to the existing radius API would be to allow setting specific corner radiuses.

For example, it could be named lv_style_set_radius_side(lv_style_t *, lv_state_t, lv_radius_corner_t, lv_style_int_t) and work just like lv_style_set_border_side(...) and friends.

One difference, however, should be that you can call lv_style_set_radius_side() multiple times using different corners without overriding other corners; e.g.,

lv_style_t half_round;
lv_style_init(&half_round);
lv_style_set_radius_side(&half_round, LV_STATE_DEFAULT, LV_RADIUS_TOP_LEFT | LV_RADIUS_BOTTOM_LEFT, 0);
lv_style_set_radius_side(&half_round, LV_STATE_DEFAULT, LV_RADIUS_TOP_RIGHT, 10);
lv_style_set_radius_side(&half_round, LV_STATE_DEFAULT, LV_RADIUS_BOTTOM_RIGHT, 5);
1 Like

Hi,

Now we are working on v8 but in v9 I’m planning to add some new graphical effect. It could be a possible extension.

May I ask if version 8.2 supports setting individual rounded corners on one side? Or any ideas for changes.

Hi,
We don’t add new features to v8 but it can be added in v9 in the future.