fillOutsideCircle() new function #2724
Replies: 4 comments 3 replies
-
You could use fthe fillArc function with a 0 to 360 degree range (full circle). The inside radius being the circle diameter you do not want erased, and the outer radius being sufficient to cover the remainder of the screen/sprite. The bad news with this approach is that the draw speed may not be enough for your needs as maths is done on every pixel. For typical small low pixel count arcs this is not much of a problem. You could calculate the required outer radius from the size of the screen/sprite and the position of the centre of the required circle. |
Beta Was this translation helpful? Give feedback.
-
There is a noticable delay when creating the sprite and I would like to eliminate that. I was thinging that I would create a backup sprite that is complete after the fillArc() function completes. Then I would create a new sprite each loop, but start by using the pushToSprite function to copy the backup into the new sprite. facebck.pushToSprite(&face,0,0); TIA |
Beta Was this translation helpful? Give feedback.
-
The drawArc function is built into the latest library version. There is an example included, see here: Try using that built-in function as you may have picked up some early development code. If you are still having problems then post a simple and complete example sketch that demonstrates the issue. |
Beta Was this translation helpful? Give feedback.
-
Works 'perfectly' for masking all the overrun. Would this be best done by readRect() to get the data, and pushRect() to redisplay it. If so, I could write the data to sd and read it later? Better yet, how do I access the inram verion of a sprite and copy the 8 bit color values into a data array without using functions in the library |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am looking for a way to clear all pixels that are outside the area of a circle, sort of the inverse of fillSmoothCircle(). This would eliminate all data that was written that went past the edge of the circle. I tried making my own andd added it to TFT_eSPI.cpp but it couldnt find it when I compiled my application.
I would like it to work for both screen circles and sprite circles.
Can you help me with this?
Martyn
Beta Was this translation helpful? Give feedback.
All reactions