I want to animate the filling of a circle outline. So I created a stencil based on a circle "line" with setLine(3, "smooth"), and then moved a rectangle("fill"..) upwards to fill the circle. However, the resulting circle line is jagged/pixellated, and not as smooth as a regular circle "line" would be.
Any ideas why the stencil line is jagged - and better yet, how to avoid it and get smooth edges?
Stencil are exactly that; they either let something through, or they don't. If you want a mask, you probably need Canvases or another approach. I can't think of one right now, sorry.
I want to animate the filling of a circle outline. So I created a stencil based on a circle "line" with setLine(3, "smooth"), and then moved a rectangle("fill"..) upwards to fill the circle. However, the resulting circle line is jagged/pixellated, and not as smooth as a regular circle "line" would be.
Any ideas why the stencil line is jagged - and better yet, how to avoid it and get smooth edges?
If you just want to fill it from bottom to top, you can change the roles of the rectangle and the circle. Use the rectangle as stencil and draw the circle through this stencil.
And then, since the stencil is rectangular, you can use scissors instead. They are probably faster. https://love2d.org/wiki/love.graphics.setScissor
micha wrote:If you just want to fill it from bottom to top, you can change the roles of the rectangle and the circle. Use the rectangle as stencil and draw the circle through this stencil.