Merge pull request #84472 from xiongyaohua/canvas_item_draw_circle_non_filled

Extend `CanvasItem::draw_circle()`, making it also draw unfilled circle.
This commit is contained in:
Rémi Verschelde 2024-05-02 12:46:14 +02:00
commit bbb86672fe
No known key found for this signature in database
GPG key ID: C3336907360768E1
5 changed files with 95 additions and 5 deletions

View file

@ -77,8 +77,14 @@
<param index="0" name="position" type="Vector2" />
<param index="1" name="radius" type="float" />
<param index="2" name="color" type="Color" />
<param index="3" name="filled" type="bool" default="true" />
<param index="4" name="width" type="float" default="-1.0" />
<param index="5" name="antialiased" type="bool" default="false" />
<description>
Draws a colored, filled circle. See also [method draw_arc], [method draw_polyline] and [method draw_polygon].
Draws a circle. See also [method draw_arc], [method draw_polyline], and [method draw_polygon].
If [param filled] is [code]true[/code], the circle will be filled with the [param color] specified. If [param filled] is [code]false[/code], the circle will be drawn as a stroke with the [param color] and [param width] specified.
If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code].
[b]Note:[/b] [param width] is only effective if [param filled] is [code]false[/code].
</description>
</method>
<method name="draw_colored_polygon">