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

(Created page with "{{newin|0.8.0|080|type=function}} 绘制一段弧. == Function == === Synopsis === <source lang="lua"> love.graphics.arc( mode, x, y, radius, angle1, angle2, segments ) </so...")
 
(Parent correction.)
Line 33: Line 33:
 
</source>
 
</source>
 
== See Also ==
 
== See Also ==
* [[parent::love.graphics]]
+
* [[parent::love.graphics (简体中文)]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Draws an arc.绘制一段弧.}}
 
{{#set:Description=Draws an arc.绘制一段弧.}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.graphics.arc}}
 
{{i18n|love.graphics.arc}}

Revision as of 02:36, 15 April 2012

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