How to draw sector of filled circle as a button

Description

Hello, I have a problem with drawing filled sector of circle as a button.
It has to be created dynamically - I can define start and end angle, the color.
I need around 10 on one screen, so it should be quite efficient.
It also should has a default and pressed state (with different color or maybe some shadow).

Can some one help me to draw it ? Maybe in canvas ?

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

Generally ESP32, PlatformIO, 480x480 display.

What LVGL version are you using?

Any (can be the newest)

What do you want to achieve?

Draw the filled sector of circle as a button, where I can define the start and end angle (from 0 to 360) and the color.

What have you tried so far?

I was trying use arc, but I had a problem with filling from circle center to the edge - it doesnt generate straight lines on edges.
I was trying use img but it’s a pain to use different images on different width angles.
I was trying imgbtn but I it’s not possible to rotate.

Screenshot and/or video

This is example of result:
2

I try arc in squareline and result seems be ok
image
what is your trouble?