Skip to content

Commit 9f7c3d0

Browse files
committed
Add methods to draw ellipses
1 parent 9dde568 commit 9f7c3d0

File tree

9 files changed

+114
-40
lines changed

9 files changed

+114
-40
lines changed

doc/classes/CanvasItem.xml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<param index="6" name="width" type="float" default="-1.0" />
4545
<param index="7" name="antialiased" type="bool" default="false" />
4646
<description>
47-
Draws an unfilled arc between the given angles with a uniform [param color] and [param width] and optional antialiasing (supported only for positive [param width]). The larger the value of [param point_count], the smoother the curve. [param center] is defined in local space. See also [method draw_circle].
47+
Draws an unfilled arc between the given angles with a uniform [param color] and [param width] and optional antialiasing (supported only for positive [param width]). The larger the value of [param point_count], the smoother the curve. [param center] is defined in local space. For elliptical arcs, see [method draw_ellipse_arc]. See also [method draw_circle].
4848
If [param width] is negative, it will be ignored and the arc will be drawn using [constant RenderingServer.PRIMITIVE_LINE_STRIP]. This means that when the CanvasItem is scaled, the arc will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code].
4949
The arc is drawn from [param start_angle] towards the value of [param end_angle] so in clockwise direction if [code]start_angle &lt; end_angle[/code] and counter-clockwise otherwise. Passing the same angles but in reversed order will produce the same arc. If absolute difference of [param start_angle] and [param end_angle] is greater than [constant @GDScript.TAU] radians, then a full circle arc is drawn (i.e. arc will not overlap itself).
5050
</description>
@@ -83,7 +83,7 @@
8383
<param index="4" name="width" type="float" default="-1.0" />
8484
<param index="5" name="antialiased" type="bool" default="false" />
8585
<description>
86-
Draws a circle, with [param position] defined in local space. See also [method draw_arc], [method draw_polyline], and [method draw_polygon].
86+
Draws a circle, with [param position] defined in local space. See also [method draw_ellipse], [method draw_arc], [method draw_polyline], and [method draw_polygon].
8787
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.
8888
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].
8989
If [param antialiased] is [code]true[/code], half transparent "feathers" will be attached to the boundary, making outlines smooth.
@@ -118,6 +118,40 @@
118118
[b]Note:[/b] [param antialiased] is only effective if [param width] is greater than [code]0.0[/code].
119119
</description>
120120
</method>
121+
<method name="draw_ellipse">
122+
<return type="void" />
123+
<param index="0" name="position" type="Vector2" />
124+
<param index="1" name="major" type="float" />
125+
<param index="2" name="minor" type="float" />
126+
<param index="3" name="color" type="Color" />
127+
<param index="4" name="filled" type="bool" default="true" />
128+
<param index="5" name="width" type="float" default="-1.0" />
129+
<param index="6" name="antialiased" type="bool" default="false" />
130+
<description>
131+
Draws an ellipse with semi-major axis [param major] and semi-minor axis [param minor]. See also [method draw_circle], [method draw_ellipse_arc], [method draw_polyline], and [method draw_polygon].
132+
If [param filled] is [code]true[/code], the ellipse will be filled with the [param color] specified. If [param filled] is [code]false[/code], the ellipse will be drawn as a stroke with the [param color] and [param width] specified.
133+
If [param width] is negative, then two-point primitives will be drawn instead of 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].
134+
If [param antialiased] is [code]true[/code], half transparent "feathers" will be attached to the boundary, making outlines smooth.
135+
[b]Note:[/b] [param width] is only effective if [param filled] is [code]false[/code].
136+
</description>
137+
</method>
138+
<method name="draw_ellipse_arc">
139+
<return type="void" />
140+
<param index="0" name="center" type="Vector2" />
141+
<param index="1" name="major" type="float" />
142+
<param index="2" name="minor" type="float" />
143+
<param index="3" name="start_angle" type="float" />
144+
<param index="4" name="end_angle" type="float" />
145+
<param index="5" name="point_count" type="int" />
146+
<param index="6" name="color" type="Color" />
147+
<param index="7" name="width" type="float" default="-1.0" />
148+
<param index="8" name="antialiased" type="bool" default="false" />
149+
<description>
150+
Draws an unfilled elliptical arc between the given angles with a uniform [param color] and [param width] and optional antialiasing (supported only for positive [param width]). The larger the value of [param point_count], the smoother the curve. For circular arcs, see [method draw_arc]. See also [method draw_ellipse].
151+
If [param width] is negative, it will be ignored and the arc will be drawn using [constant RenderingServer.PRIMITIVE_LINE_STRIP]. This means that when the CanvasItem is scaled, the arc will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code].
152+
The arc is drawn from [param start_angle] towards the value of [param end_angle] so in clockwise direction if [code]start_angle &lt; end_angle[/code] and counter-clockwise otherwise. Passing the same angles but in reversed order will produce the same arc. If absolute difference of [param start_angle] and [param end_angle] is greater than [constant @GDScript.TAU] radians, then a full ellipse is drawn (i.e. arc will not overlap itself).
153+
</description>
154+
</method>
121155
<method name="draw_end_animation">
122156
<return type="void" />
123157
<description>

doc/classes/RenderingServer.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,18 @@
227227
If [param ignore] is [code]true[/code], ignore clipping on items drawn with this canvas item until this is called again with [param ignore] set to [code]false[/code].
228228
</description>
229229
</method>
230+
<method name="canvas_item_add_ellipse">
231+
<return type="void" />
232+
<param index="0" name="item" type="RID" />
233+
<param index="1" name="pos" type="Vector2" />
234+
<param index="2" name="major" type="float" />
235+
<param index="3" name="minor" type="float" />
236+
<param index="4" name="color" type="Color" />
237+
<param index="5" name="antialiased" type="bool" default="false" />
238+
<description>
239+
Draws an ellipse with semi-major axis [param major] and semi-minor axis [param minor] on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_ellipse].
240+
</description>
241+
</method>
230242
<method name="canvas_item_add_lcd_texture_rect_region">
231243
<return type="void" />
232244
<param index="0" name="item" type="RID" />

scene/main/canvas_item.cpp

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -776,8 +776,10 @@ void CanvasItem::draw_polyline_colors(const Vector<Point2> &p_points, const Vect
776776
RenderingServer::get_singleton()->canvas_item_add_polyline(canvas_item, p_points, p_colors, p_width, p_antialiased);
777777
}
778778

779-
void CanvasItem::draw_arc(const Vector2 &p_center, real_t p_radius, real_t p_start_angle, real_t p_end_angle, int p_point_count, const Color &p_color, real_t p_width, bool p_antialiased) {
779+
void CanvasItem::draw_ellipse_arc(const Vector2 &p_center, real_t p_major, real_t p_minor, real_t p_start_angle, real_t p_end_angle, int p_point_count, const Color &p_color, real_t p_width, bool p_antialiased) {
780780
ERR_THREAD_GUARD;
781+
ERR_DRAW_GUARD;
782+
781783
Vector<Point2> points;
782784
points.resize(p_point_count);
783785
Point2 *points_ptr = points.ptrw();
@@ -786,12 +788,19 @@ void CanvasItem::draw_arc(const Vector2 &p_center, real_t p_radius, real_t p_sta
786788
const real_t delta_angle = CLAMP(p_end_angle - p_start_angle, -Math::TAU, Math::TAU);
787789
for (int i = 0; i < p_point_count; i++) {
788790
real_t theta = (i / (p_point_count - 1.0f)) * delta_angle + p_start_angle;
789-
points_ptr[i] = p_center + Vector2(Math::cos(theta), Math::sin(theta)) * p_radius;
791+
points_ptr[i] = p_center + Vector2(p_major * Math::cos(theta), p_minor * Math::sin(theta));
790792
}
791793

792794
draw_polyline(points, p_color, p_width, p_antialiased);
793795
}
794796

797+
void CanvasItem::draw_arc(const Vector2 &p_center, real_t p_radius, real_t p_start_angle, real_t p_end_angle, int p_point_count, const Color &p_color, real_t p_width, bool p_antialiased) {
798+
ERR_THREAD_GUARD;
799+
ERR_DRAW_GUARD;
800+
801+
draw_ellipse_arc(p_center, p_radius, p_radius, p_start_angle, p_end_angle, p_point_count, p_color, p_width, p_antialiased);
802+
}
803+
795804
void CanvasItem::draw_multiline(const Vector<Point2> &p_points, const Color &p_color, real_t p_width, bool p_antialiased) {
796805
ERR_THREAD_GUARD;
797806
ERR_DRAW_GUARD;
@@ -836,18 +845,18 @@ void CanvasItem::draw_rect(const Rect2 &p_rect, const Color &p_color, bool p_fil
836845
}
837846
}
838847

839-
void CanvasItem::draw_circle(const Point2 &p_pos, real_t p_radius, const Color &p_color, bool p_filled, real_t p_width, bool p_antialiased) {
848+
void CanvasItem::draw_ellipse(const Point2 &p_pos, real_t p_major, real_t p_minor, const Color &p_color, bool p_filled, real_t p_width, bool p_antialiased) {
840849
ERR_THREAD_GUARD;
841850
ERR_DRAW_GUARD;
842851

843852
if (p_filled) {
844853
if (p_width != -1.0) {
845-
WARN_PRINT("The draw_circle() \"width\" argument has no effect when \"filled\" is \"true\".");
854+
WARN_PRINT("The \"width\" argument has no effect when \"filled\" is \"true\".");
846855
}
847856

848-
RenderingServer::get_singleton()->canvas_item_add_circle(canvas_item, p_pos, p_radius, p_color, p_antialiased);
849-
} else if (p_width >= 2.0 * p_radius) {
850-
RenderingServer::get_singleton()->canvas_item_add_circle(canvas_item, p_pos, p_radius + 0.5 * p_width, p_color, p_antialiased);
857+
RenderingServer::get_singleton()->canvas_item_add_ellipse(canvas_item, p_pos, p_major, p_minor, p_color, p_antialiased);
858+
} else if (p_width >= 2.0 * MAX(p_major, p_minor)) {
859+
RenderingServer::get_singleton()->canvas_item_add_ellipse(canvas_item, p_pos, p_major + 0.5 * p_width, p_minor + 0.5 * p_width, p_color, p_antialiased);
851860
} else {
852861
// Tessellation count is hardcoded. Keep in sync with the same variable in `RendererCanvasCull::canvas_item_add_circle()`.
853862
const int circle_segments = 64;
@@ -860,8 +869,8 @@ void CanvasItem::draw_circle(const Point2 &p_pos, real_t p_radius, const Color &
860869

861870
for (int i = 0; i < circle_segments; i++) {
862871
float angle = i * circle_point_step;
863-
points_ptr[i].x = Math::cos(angle) * p_radius;
864-
points_ptr[i].y = Math::sin(angle) * p_radius;
872+
points_ptr[i].x = Math::cos(angle) * p_major;
873+
points_ptr[i].y = Math::sin(angle) * p_minor;
865874
points_ptr[i] += p_pos;
866875
}
867876
points_ptr[circle_segments] = points_ptr[0];
@@ -872,6 +881,13 @@ void CanvasItem::draw_circle(const Point2 &p_pos, real_t p_radius, const Color &
872881
}
873882
}
874883

884+
void CanvasItem::draw_circle(const Point2 &p_pos, real_t p_radius, const Color &p_color, bool p_filled, real_t p_width, bool p_antialiased) {
885+
ERR_THREAD_GUARD;
886+
ERR_DRAW_GUARD;
887+
888+
draw_ellipse(p_pos, p_radius, p_radius, p_color, p_filled, p_width, p_antialiased);
889+
}
890+
875891
void CanvasItem::draw_texture(const Ref<Texture2D> &p_texture, const Point2 &p_pos, const Color &p_modulate) {
876892
ERR_THREAD_GUARD;
877893
ERR_DRAW_GUARD;
@@ -1378,11 +1394,13 @@ void CanvasItem::_bind_methods() {
13781394
ClassDB::bind_method(D_METHOD("draw_dashed_line", "from", "to", "color", "width", "dash", "aligned", "antialiased"), &CanvasItem::draw_dashed_line, DEFVAL(-1.0), DEFVAL(2.0), DEFVAL(true), DEFVAL(false));
13791395
ClassDB::bind_method(D_METHOD("draw_polyline", "points", "color", "width", "antialiased"), &CanvasItem::draw_polyline, DEFVAL(-1.0), DEFVAL(false));
13801396
ClassDB::bind_method(D_METHOD("draw_polyline_colors", "points", "colors", "width", "antialiased"), &CanvasItem::draw_polyline_colors, DEFVAL(-1.0), DEFVAL(false));
1397+
ClassDB::bind_method(D_METHOD("draw_ellipse_arc", "center", "major", "minor", "start_angle", "end_angle", "point_count", "color", "width", "antialiased"), &CanvasItem::draw_ellipse_arc, DEFVAL(-1.0), DEFVAL(false));
13811398
ClassDB::bind_method(D_METHOD("draw_arc", "center", "radius", "start_angle", "end_angle", "point_count", "color", "width", "antialiased"), &CanvasItem::draw_arc, DEFVAL(-1.0), DEFVAL(false));
13821399
ClassDB::bind_method(D_METHOD("draw_multiline", "points", "color", "width", "antialiased"), &CanvasItem::draw_multiline, DEFVAL(-1.0), DEFVAL(false));
13831400
ClassDB::bind_method(D_METHOD("draw_multiline_colors", "points", "colors", "width", "antialiased"), &CanvasItem::draw_multiline_colors, DEFVAL(-1.0), DEFVAL(false));
13841401
ClassDB::bind_method(D_METHOD("draw_rect", "rect", "color", "filled", "width", "antialiased"), &CanvasItem::draw_rect, DEFVAL(true), DEFVAL(-1.0), DEFVAL(false));
13851402
ClassDB::bind_method(D_METHOD("draw_circle", "position", "radius", "color", "filled", "width", "antialiased"), &CanvasItem::draw_circle, DEFVAL(true), DEFVAL(-1.0), DEFVAL(false));
1403+
ClassDB::bind_method(D_METHOD("draw_ellipse", "position", "major", "minor", "color", "filled", "width", "antialiased"), &CanvasItem::draw_ellipse, DEFVAL(true), DEFVAL(-1.0), DEFVAL(false));
13861404
ClassDB::bind_method(D_METHOD("draw_texture", "texture", "position", "modulate"), &CanvasItem::draw_texture, DEFVAL(Color(1, 1, 1, 1)));
13871405
ClassDB::bind_method(D_METHOD("draw_texture_rect", "texture", "rect", "tile", "modulate", "transpose"), &CanvasItem::draw_texture_rect, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(false));
13881406
ClassDB::bind_method(D_METHOD("draw_texture_rect_region", "texture", "rect", "src_rect", "modulate", "transpose", "clip_uv"), &CanvasItem::draw_texture_rect_region, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(false), DEFVAL(true));

scene/main/canvas_item.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,12 @@ class CanvasItem : public Node {
304304
void draw_line(const Point2 &p_from, const Point2 &p_to, const Color &p_color, real_t p_width = -1.0, bool p_antialiased = false);
305305
void draw_polyline(const Vector<Point2> &p_points, const Color &p_color, real_t p_width = -1.0, bool p_antialiased = false);
306306
void draw_polyline_colors(const Vector<Point2> &p_points, const Vector<Color> &p_colors, real_t p_width = -1.0, bool p_antialiased = false);
307+
void draw_ellipse_arc(const Vector2 &p_center, real_t p_major, real_t p_minor, real_t p_start_angle, real_t p_end_angle, int p_point_count, const Color &p_color, real_t p_width = -1.0, bool p_antialiased = false);
307308
void draw_arc(const Vector2 &p_center, real_t p_radius, real_t p_start_angle, real_t p_end_angle, int p_point_count, const Color &p_color, real_t p_width = -1.0, bool p_antialiased = false);
308309
void draw_multiline(const Vector<Point2> &p_points, const Color &p_color, real_t p_width = -1.0, bool p_antialiased = false);
309310
void draw_multiline_colors(const Vector<Point2> &p_points, const Vector<Color> &p_colors, real_t p_width = -1.0, bool p_antialiased = false);
310311
void draw_rect(const Rect2 &p_rect, const Color &p_color, bool p_filled = true, real_t p_width = -1.0, bool p_antialiased = false);
312+
void draw_ellipse(const Point2 &p_pos, real_t p_major, real_t p_minor, const Color &p_color, bool p_filled = true, real_t p_width = -1.0, bool p_antialiased = false);
311313
void draw_circle(const Point2 &p_pos, real_t p_radius, const Color &p_color, bool p_filled = true, real_t p_width = -1.0, bool p_antialiased = false);
312314
void draw_texture(const Ref<Texture2D> &p_texture, const Point2 &p_pos, const Color &p_modulate = Color(1, 1, 1, 1));
313315
void draw_texture_rect(const Ref<Texture2D> &p_texture, const Rect2 &p_rect, bool p_tile = false, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false);

servers/rendering/renderer_canvas_cull.cpp

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,56 +1419,56 @@ void RendererCanvasCull::canvas_item_add_rect(RID p_item, const Rect2 &p_rect, c
14191419
}
14201420
}
14211421

1422-
void RendererCanvasCull::canvas_item_add_circle(RID p_item, const Point2 &p_pos, float p_radius, const Color &p_color, bool p_antialiased) {
1422+
void RendererCanvasCull::canvas_item_add_ellipse(RID p_item, const Point2 &p_pos, float p_major, float p_minor, const Color &p_color, bool p_antialiased) {
14231423
Item *canvas_item = canvas_item_owner.get_or_null(p_item);
14241424
ERR_FAIL_NULL(canvas_item);
14251425

1426-
static const int circle_segments = 64;
1426+
static const int ellipse_segments = 64;
14271427

14281428
{
1429-
Item::CommandPolygon *circle = canvas_item->alloc_command<Item::CommandPolygon>();
1430-
ERR_FAIL_NULL(circle);
1429+
Item::CommandPolygon *ellipse = canvas_item->alloc_command<Item::CommandPolygon>();
1430+
ERR_FAIL_NULL(ellipse);
14311431

1432-
circle->primitive = RS::PRIMITIVE_TRIANGLES;
1432+
ellipse->primitive = RS::PRIMITIVE_TRIANGLES;
14331433

14341434
Vector<int> indices;
14351435
Vector<Vector2> points;
14361436

1437-
points.resize(circle_segments + 2);
1437+
points.resize(ellipse_segments + 2);
14381438
Vector2 *points_ptr = points.ptrw();
14391439

1440-
// Store circle center in the last point.
1441-
points_ptr[circle_segments + 1] = p_pos;
1440+
// Store ellipse center in the last point.
1441+
points_ptr[ellipse_segments + 1] = p_pos;
14421442

1443-
const real_t circle_point_step = Math::TAU / circle_segments;
1443+
const real_t ellipse_point_step = Math::TAU / ellipse_segments;
14441444

1445-
for (int i = 0; i < circle_segments + 1; i++) {
1446-
float angle = i * circle_point_step;
1447-
points_ptr[i].x = Math::cos(angle) * p_radius;
1448-
points_ptr[i].y = Math::sin(angle) * p_radius;
1445+
for (int i = 0; i < ellipse_segments + 1; i++) {
1446+
float angle = i * ellipse_point_step;
1447+
points_ptr[i].x = Math::cos(angle) * p_major;
1448+
points_ptr[i].y = Math::sin(angle) * p_minor;
14491449
points_ptr[i] += p_pos;
14501450
}
14511451

1452-
indices.resize(circle_segments * 3);
1452+
indices.resize(ellipse_segments * 3);
14531453
int *indices_ptr = indices.ptrw();
14541454

1455-
for (int i = 0; i < circle_segments; i++) {
1456-
indices_ptr[i * 3 + 0] = circle_segments + 1;
1455+
for (int i = 0; i < ellipse_segments; i++) {
1456+
indices_ptr[i * 3 + 0] = ellipse_segments + 1;
14571457
indices_ptr[i * 3 + 1] = i;
14581458
indices_ptr[i * 3 + 2] = i + 1;
14591459
}
14601460

14611461
Vector<Color> color;
14621462
color.push_back(p_color);
1463-
circle->polygon.create(indices, points, color);
1463+
ellipse->polygon.create(indices, points, color);
14641464
}
14651465

14661466
if (p_antialiased) {
14671467
float border_size = FEATHER_SIZE;
14681468

1469-
const float diameter = p_radius * 2.0f;
1470-
if (0.0f <= diameter && diameter < 1.0f) {
1471-
border_size *= p_radius;
1469+
const float max_axis = fmax(p_major, p_minor) * 2.0f;
1470+
if (0.0f <= max_axis && max_axis < 1.0f) {
1471+
border_size *= max_axis * 0.5f;
14721472
}
14731473

14741474
Item::CommandPolygon *feather = canvas_item->alloc_command<Item::CommandPolygon>();
@@ -1481,25 +1481,25 @@ void RendererCanvasCull::canvas_item_add_circle(RID p_item, const Point2 &p_pos,
14811481
Vector<Color> colors;
14821482
Vector<Vector2> points;
14831483

1484-
points.resize(2 * circle_segments + 2);
1485-
colors.resize(2 * circle_segments + 2);
1484+
points.resize(2 * ellipse_segments + 2);
1485+
colors.resize(2 * ellipse_segments + 2);
14861486

1487-
const real_t circle_point_step = Math::TAU / circle_segments;
1487+
const real_t ellipse_point_step = Math::TAU / ellipse_segments;
14881488

14891489
Vector2 *points_ptr = points.ptrw();
14901490
Color *colors_ptr = colors.ptrw();
14911491

1492-
for (int i = 0; i < circle_segments + 1; i++) {
1493-
const float angle = i * circle_point_step;
1492+
for (int i = 0; i < ellipse_segments + 1; i++) {
1493+
const float angle = i * ellipse_point_step;
14941494
const float c = Math::cos(angle);
14951495
const float s = Math::sin(angle);
14961496

1497-
points_ptr[i * 2].x = c * p_radius;
1498-
points_ptr[i * 2].y = s * p_radius;
1497+
points_ptr[i * 2].x = c * p_major;
1498+
points_ptr[i * 2].y = s * p_minor;
14991499
points_ptr[i * 2] += p_pos;
15001500

1501-
points_ptr[i * 2 + 1].x = c * (p_radius + border_size);
1502-
points_ptr[i * 2 + 1].y = s * (p_radius + border_size);
1501+
points_ptr[i * 2 + 1].x = c * (p_major + border_size);
1502+
points_ptr[i * 2 + 1].y = s * (p_minor + border_size);
15031503
points_ptr[i * 2 + 1] += p_pos;
15041504

15051505
colors_ptr[i * 2] = p_color;
@@ -1510,6 +1510,10 @@ void RendererCanvasCull::canvas_item_add_circle(RID p_item, const Point2 &p_pos,
15101510
}
15111511
}
15121512

1513+
void RendererCanvasCull::canvas_item_add_circle(RID p_item, const Point2 &p_pos, float p_radius, const Color &p_color, bool p_antialiased) {
1514+
canvas_item_add_ellipse(p_item, p_pos, p_radius, p_radius, p_color, p_antialiased);
1515+
}
1516+
15131517
void RendererCanvasCull::canvas_item_add_texture_rect(RID p_item, const Rect2 &p_rect, RID p_texture, bool p_tile, const Color &p_modulate, bool p_transpose) {
15141518
Item *canvas_item = canvas_item_owner.get_or_null(p_item);
15151519
ERR_FAIL_NULL(canvas_item);

0 commit comments

Comments
 (0)