You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
draw_rect has a filled parameter and a width parameter for the cases where you want to draw a non-filled rect.
draw_circle doesn't have that, forcing you to use draw_arc with a big angle whenever you want an unfilled circle (and forcing you to discover it in the first place).
btw, a filled circle is a disk, so draw_circle doesn't technically draw circles.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add the fitting parameters and functionality to draw_circle. It would feel natural to me. Having this as a parameter allows to quickly switch between the filled and unfilled versions when needed, without the need to rewrite the line.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
draw_circle(position: Vector2, radius: float, color: Color, filled := true, width := -1.0)
The parameter order would be the same as draw_rect for consistency.
Behavior should be the same too:
if filled == true, the current behavior remains
if filled == false, then a circle of with width is drawn. I think width == -1.0 means 1 screen pixel.
I guess internally it could simply branch to draw_arc with an automatic point count, but that's the naive way. I don't know if it's easy to make it draw an actual circle, and what performance difference there is with a filled one.
If this enhancement will not be used often, can it be worked around with a few lines of script?
it can be worked around with draw_arc, but it's more verbose and harder to find. It also has a point_count, so no true circles.
Is there a reason why this should be core and not an add-on in the asset library?
it's about improving core
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
stuff
Describe the problem or limitation you are having in your project
draw_rect
has afilled
parameter and awidth
parameter for the cases where you want to draw a non-filled rect.draw_circle
doesn't have that, forcing you to usedraw_arc
with a big angle whenever you want an unfilled circle (and forcing you to discover it in the first place).btw, a filled circle is a disk, so
draw_circle
doesn't technically draw circles.Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add the fitting parameters and functionality to
draw_circle
. It would feel natural to me. Having this as a parameter allows to quickly switch between the filled and unfilled versions when needed, without the need to rewrite the line.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
draw_circle(position: Vector2, radius: float, color: Color, filled := true, width := -1.0)
The parameter order would be the same as
draw_rect
for consistency.Behavior should be the same too:
filled == true
, the current behavior remainsfilled == false
, then a circle of withwidth
is drawn. I thinkwidth == -1.0
means 1 screen pixel.I guess internally it could simply branch to draw_arc with an automatic point count, but that's the naive way. I don't know if it's easy to make it draw an actual circle, and what performance difference there is with a filled one.
If this enhancement will not be used often, can it be worked around with a few lines of script?
it can be worked around with
draw_arc
, but it's more verbose and harder to find. It also has apoint_count
, so no true circles.Is there a reason why this should be core and not an add-on in the asset library?
it's about improving core
The text was updated successfully, but these errors were encountered: