Too many badly named CanvasItem draw_ methods. #4168
Closed
setanarut
started this conversation in
Engine Core
Replies: 2 comments 1 reply
-
Godot's terminology is really arbitrary and tedious. and unfortunately not simple and elegant |
Beta Was this translation helpful? Give feedback.
0 replies
-
Good thing part of this has been brought up. I suppose it would be a good idea to share some of the proposed renames in the Tracker itself, too. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Too many badly named CanvasItem draw_ methods in Godot 4. There is no difference between
poly
andmulti
A polyline can be opened/closed also a multiline can be opened/closed also A polygon can be opened/closed.
draw_multimesh()
draw_line()
draw_multiline()
draw_multiline_colors()
draw_polyline()
draw_polyline_colors()
draw_polygon()
draw_colored_polygon()
draw_primitive()
Another oddity. Primitives in geometry can have more than 4 vertices. But according to the
draw_primitive()
method this is not possible.There is no difference between a multi-line and a single-line if there are only two points.
Proposal:
Reduced methods and more understandable names. Primitives such as
draw_circle()
anddraw_rect()
can remain.draw_polymesh()
draw_lines()
# if there are two points it's a single line (simple and elegant)draw_regular_polygon(... closed: bool, fill: bool)
# minimum 3 cornerdraw_polygon(... closed: bool, fill: bool)
Beta Was this translation helpful? Give feedback.
All reactions