Closed rafik73github closed 5 years ago
There is no "draw a rotated rectangle function" in the library so you need to write this yourself.
A rotated rectangle can be drawn using two triangles, so you only need to work out where the corners are using trig. I suspect you want to draw clock hands so in this case maybe single triangles can be used. If you wish to draw "moving" hands you also have to erase the old rectangle before your draw the new one, so expect to get some flickering.
With single line hands the method I used to reduce flickering was:
Welcome How do you rotate a filled rectangle? I want to draw clock hands in this way. Project based on the TFT_Clock.ino program. Source: https://github.com/Bodmer/TFT_HX8357/tree/master/examples/TFT_Clock
Greetings