esphome/feature-requests

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

Zzo911 opened this issue · 4 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

You could just use LVGL.

How would this be done in LVGL?

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

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