Avoid jagged edges of stencil?
Posted: Sat Mar 09, 2013 2:35 pm
Hi,
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?
Thanks for any input,
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?
Thanks for any input,
Code: Select all
love.graphics.setLine(3, "smooth")
local makeFillStencil = function()
love.graphics.circle("line", xC, yC, radius)
end
local fillStencil = love.graphics.newStencil(makeFillStencil)
love.graphics.setStencil(fillStencil)
love.graphics.rectangle("fill", xC - radius, yC, xC + radius, yC + radius)
love.graphics.setStencil()