Bodmer / TFT_eSPI

Arduino and PlatformIO IDE compatible TFT library optimised for the Raspberry Pi Pico (RP2040), STM32, ESP8266 and ESP32 that supports different driver chips

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Round viewport

flykarlos opened this issue · comments

Hello Bodmer
I am using your library and each and every time I'm amazed by versatility it provides.
I am working now on round display with 480x480 resolution using third party driver and tft_espi sprites as framebufers. As you probably already guessed with this big resolution writing a sprite to display takes pretty long time, that is why I started to think how to decrease writing time.
Round displays are seen by its drivers and library as square displays, this means so around 21% of its pixels are "virtual", yet pushing a sprite to display still writes to this virtual pixels too. To speed up pushing sprite to display it would be great to write to only real, visible pixels that round displays have. Now I should mention viewports, as to my understanding this is exactly what we should use in such cases. But viewports can only be rectangular as for now.
Have you ever considered adding rounded viewports to the library? Is this even possible? Or mathematics involved in calculating if pixel is within screen area would take similar time as writing to virtual pixels?
Thanks again for your amazing work!