mirror of
https://github.com/vrld/HC.git
synced 2024-11-18 12:54:23 +00:00
Merge pull request #65 from tesselode/master
allow passing segments argument to CircleShape:draw()
This commit is contained in:
commit
9a05518300
@ -284,6 +284,13 @@ Built-in Shapes
|
||||
|
||||
.. class:: CircleShape
|
||||
|
||||
.. function:: CircleShape:draw(mode, segments)
|
||||
|
||||
:param DrawMode mode: How to draw the shape. Either 'line' or 'fill'.
|
||||
:param number segments: The number of segments to draw the circle with.
|
||||
|
||||
Draw the circle shape either filled or as an outline and with the specified number of segments.
|
||||
|
||||
.. class:: PointShape
|
||||
|
||||
.. function:: newPolygonShape(...)
|
||||
|
@ -418,7 +418,8 @@ function ConcavePolygonShape:draw(mode, wireframe)
|
||||
end
|
||||
|
||||
function CircleShape:draw(mode, segments)
|
||||
love.graphics.circle(mode or 'line', self:outcircle())
|
||||
local x, y, r = self:outcircle()
|
||||
love.graphics.circle(mode or 'line', x, y, r, segments)
|
||||
end
|
||||
|
||||
function PointShape:draw()
|
||||
|
Loading…
Reference in New Issue
Block a user