Anti-aliased Arc #2248
-
It would be nice to have a function which can draw an anti-aliased arc.
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
That is one of the more difficult algorithms to implement. The LVGL library implements an arc function but I have not looked at how it is done. I suspect the filled SmoothCircle function could be adapted but I would have to think about how the endpoints are implemented. The ILI9341_Due library had an arc function but it was not antialiased but could probably be converted. It is not something I have time to experiemnt with at the moment. |
Beta Was this translation helpful? Give feedback.
-
I thought about this further and had a go at implementing it. Here is a demo of the new function: [deleted file] The arc is antialiased except at the ends, I will think on that more. The background is not read at the moment but when added to the library that will be an option. |
Beta Was this translation helpful? Give feedback.
-
The sketch uploaded had rendering errors, so it has been deleted. This has been fixed in my copy and I will add the new function to the library. |
Beta Was this translation helpful? Give feedback.
-
Here is my project. It's a work in progress so it needs some cleaning up 🧹 🧹 VID-20221230-WA0003.mp4I've attached a pot-meter to TMP_RD (GPIO15) and a wire to TOUCH_RD (GPIO4) for testing purposes. BTW. The code also works for an ESP8266 if you remove the sprite and ADC stuff. Thanks for all your help so far! |
Beta Was this translation helpful? Give feedback.
-
I have added new arc rendering features to the master branch of the library here: https://github.com/Bodmer/TFT_eSPI New examples have been added. |
Beta Was this translation helpful? Give feedback.
I have added new arc rendering features to the master branch of the library here:
https://github.com/Bodmer/TFT_eSPI
New examples have been added.