Bug with LV_ARC_MODE_REVERSE

Description

I’m attempting to make a dashboard to monitor water tank levels using arcs. It’ll contain one big arc with an arc on either side. The side arcs indicate full at the top and empty at the bottom. The left arc works fine, but the right arc needs mirrored to also show full at the top and empty at the bottom.

It seems when I use LV_ARC_MODE_REVERSE with lv_arc_set_bg_angles and lv_arc_set_value the arc gets drawn in strange ways.

If I drag the arc handle to the left of its default position, the indicator flips around full circle and draws off the background (see the last screenshot).

What MCU/Processor/Board and compiler are you using?

The CodeBlocks Simulator

What LVGL version are you using?

8.0.1, as well as the latest master

What do you want to achieve?

An arc exactly like the first screenshot below, but with the blue indicator on the bottom.

What have you tried so far?

The simulator and real hardware.

Code to reproduce

        static lv_obj_t* arcBlack;
        arcBlack = lv_arc_create(lv_scr_act());
        lv_arc_set_mode(arcBlack, LV_ARC_MODE_REVERSE);
        lv_arc_set_bg_angles(arcBlack, 0, 90);
        lv_arc_set_value(arcBlack, 40);

Screenshot and/or video

In normal arc mode. This is what I want, but the indicator mirrored to the bottom.
good arc

Here’s what happens with the same code in reverse mode:
bad arc

And when dragging the handle backwards:
handle backwards

Thanks!

@kisvegabor Fixed an arc bug here.

Thanks a lot!