feature-requests icon indicating copy to clipboard operation
feature-requests copied to clipboard

[display] Add drawRoundRect(), fillRoundRect(), drawCircleHelper(), fillCircleHelper()

Open Zzo911 opened this issue 1 year ago • 5 comments

Describe the problem you have/What new integration you would like

Hello, Would it be possible to add those functions into the display component?

it.drawRoundRect(x, y, width, height, corner radius, colour); it.fillRoundRect(x, y, width, height, corner radius, colour); it.drawCircleHelper(x, y, radius, corner bitmask, delta (offset from center), colour); it.fillCircleHelper(x, y, radius, corner bitmask, delta (offset from center), colour); //bitmask: Mask bit #1 or bit #2 to indicate which quarters of the circle we're doing

Many thanks

Please describe your use case for this integration and alternatives you've tried:

I'm planing to reproduce a kind of dashboard similar to the one is Home Assistant to an e-paper screen. To make the cards, I'd like to have rounded rectangles. The circle helpers will be used to reproduce the energy distribution card with lines from the solar panels to the home which have a rounded angle.

Additional context

Link to library

Zzo911 avatar Nov 23 '24 17:11 Zzo911

You could just use LVGL.

clydebarrow avatar Nov 24 '24 01:11 clydebarrow

How would this be done in LVGL?

lanrat avatar Nov 24 '24 07:11 lanrat

See some examples in the doc... https://esphome.io/cookbook/lvgl

nagyrobi avatar Nov 24 '24 08:11 nagyrobi

See some examples in the doc... https://esphome.io/cookbook/lvgl

Unfortunately, I can’t find a way to make LVGL works with the display platform. Only the it.xxx functions are working.

display:

  • platform: waveshare_epaper

Zzo911 avatar Nov 24 '24 11:11 Zzo911

Just looking for this too. LVGL isnt an option for me since I am using an ESP8266 (e.g. not enough memory) so creating a rounded rectangle is pretty tedious wihtout a dedicated function.

roberttco avatar Nov 07 '25 18:11 roberttco