moononournation / Arduino_GFX

Arduino GFX developing for various color displays and various data bus interfaces
Other
761 stars 151 forks source link

Adding fillRotatedRect #453

Closed flyandi closed 2 months ago

flyandi commented 3 months ago

Adding a new primitive to draw a rotated rect. I use this function for a few elements now.

Takes in a variable pivot point that goes from the center of the rectangle and can be adjusted.

moononournation commented 3 months ago

any use case for using this function?

flyandi commented 3 months ago

I use it to create gauges with a canvas that clips the rotates rectangle.

moononournation commented 3 months ago

The implementation is simple and and the drawing speed should be similar between custom function and inside GFX, so it is not need include this to a GFX library.