esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
420 stars 26 forks source link

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

Open Zzo911 opened 2 days ago

Zzo911 commented 2 days ago

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

clydebarrow commented 2 days ago

You could just use LVGL.

lanrat commented 1 day ago

How would this be done in LVGL?

nagyrobi commented 1 day ago

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

Zzo911 commented 1 day ago

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: