Difference between revisions of "love.graphics.circle (简体中文)"
m (Stop breaking parents) |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 33: | Line 33: | ||
function love.draw() | function love.draw() | ||
love.graphics.setColor(1, 1, 1) | love.graphics.setColor(1, 1, 1) | ||
− | love.graphics.circle("fill", 300, 300, 50, 100) -- Draw white circle with 100 segments. | + | love.graphics.circle("fill", 300, 300, 50, 100) -- Draw white circle with 100 segments. |
love.graphics.setColor(1, 0, 0) | love.graphics.setColor(1, 0, 0) | ||
− | love.graphics.circle("fill", 300, 300, 50, 5) -- Draw red circle with five segments. | + | love.graphics.circle("fill", 300, 300, 50, 5) -- Draw red circle with five segments. 可理解为红色圆内正五边形 所以用这个方法来画正多边形也是可行的 |
end | end | ||
</source> | </source> | ||
+ | |||
== See Also == | == See Also == | ||
− | * [[parent::love.graphics]] | + | * [[parent::love.graphics (简体中文)]] |
* [[love.graphics.arc]] | * [[love.graphics.arc]] | ||
* [[love.graphics.ellipse]] | * [[love.graphics.ellipse]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | [[Sub-Category::Drawing| ]] | + | [[Sub-Category::Drawing (简体中文)| ]] |
{{#set:Description=Draws a circle.}} | {{#set:Description=Draws a circle.}} | ||
{{#set:Since=000}} | {{#set:Since=000}} | ||
+ | |||
+ | == Other Languages == | ||
+ | {{i18n|love.graphics.circle}} |
Latest revision as of 21:39, 30 October 2022
绘制一个圆.
Contents
Function
Synopsis
love.graphics.circle( mode, x, y, radius )
Arguments
DrawMode mode
- 用什么方式绘制圆,目前有两种“fill”和“line”,也就是填充还是画线的意思
number x
- 圆心的 X 坐标
number y
- 圆心的 Y 坐标
number radius
- 圆的半径
Returns
无返回.
Function
Synopsis
love.graphics.circle( mode, x, y, radius, segments )
Arguments
DrawMode mode
- 用什么方式绘制圆,目前有两种“fill”和“line”,也就是填充还是画线的意思
number x
- 圆心的 X 坐标
number y
- 圆心的 Y 坐标
number radius
- 圆的半径
number segments
- 画圆的段数或是块数 注:不同版本的 LÖVE 下该参数的默认值是不一样的
Returns
无返回
Examples
The effect of the segment argument
function love.draw()
love.graphics.setColor(1, 1, 1)
love.graphics.circle("fill", 300, 300, 50, 100) -- Draw white circle with 100 segments.
love.graphics.setColor(1, 0, 0)
love.graphics.circle("fill", 300, 300, 50, 5) -- Draw red circle with five segments. 可理解为红色圆内正五边形 所以用这个方法来画正多边形也是可行的
end
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info