Available since LÖVE 0.8.0
This function is not supported in earlier versions.
Draws a filled or unfilled arc at position (x, y)
. The arc is drawn from angle1
to angle2
in radians. The segments
parameter determines how many segments are used to draw the arc. The more segments, the smoother the edge.
Draws an arc using the "pie" ArcType.
love.graphics.arc( drawmode, x, y, radius, angle1, angle2, segments )
DrawMode drawmode
number x
number y
number radius
number angle1
number angle2
number segments (10)
Nothing.
Available since LÖVE 0.10.1
This variant is not supported in earlier versions.
love.graphics.arc( drawmode, arctype, x, y, radius, angle1, angle2, segments )
DrawMode drawmode
ArcType arctype
number x
number y
number radius
number angle1
number angle2
number segments (10)
Nothing.
function love.draw( ) love.graphics.arc( "fill", 400, 300, 100, 0, math.pi ) end
pacwidth = math.pi / 6 -- size of his mouth function love.draw( ) love.graphics.setColor( 255, 255, 0 ) -- pacman needs to be yellow love.graphics.arc( "fill", 400, 300, 100, pacwidth, (math.pi * 2) - pacwidth ) end
The arc is drawn counter clockwise if the starting angle is numerically bigger than the final angle. The arc is drawn clockwise if the final angle is numerically bigger than the starting angle.
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.graphics.arc