Difference between revisions of "love.graphics.arc (简体中文)"

(Parent correction.)
m
 
Line 35: Line 35:
 
* [[parent::love.graphics (简体中文)]]
 
* [[parent::love.graphics (简体中文)]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Sub-Category::Drawing (简体中文)| ]]
 
{{#set:Description=Draws an arc.绘制一段弧.}}
 
{{#set:Description=Draws an arc.绘制一段弧.}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.graphics.arc}}
 
{{i18n|love.graphics.arc}}

Latest revision as of 00:19, 4 April 2013

Available since LÖVE 0.8.0
This function is not supported in earlier versions.

绘制一段弧.

Function

Synopsis

love.graphics.arc( mode, x, y, radius, angle1, angle2, segments )

Arguments

DrawMode mode
如何绘制这个弧.
number x
X坐标.
number y
Y坐标.
number radius
圆弧的半径
number angle1
开始的角度
number angle2
结束的角度
number segments (10)
The number of segments used for drawing the arc.用于绘制弧的段数

Returns

Nothing.

Examples

绘制一个半圆

function love.draw( )
  love.graphics.arc( "fill", 400, 300, 100, 0, math.pi )
end

绘制一个 Pacman(吃豆人:)

pacwidth = math.pi / 6 -- 嘴的大小
function love.draw( )
  love.graphics.setColor( 255, 255, 0 ) -- 吃豆人是黄色滴
  love.graphics.arc( "fill", 400, 300, 100, pacwidth, (math.pi * 2) - pacwidth )
end

See Also


Other Languages