diff options
author | Marc Gilleron <marc.gilleron@gmail.com> | 2022-09-19 11:37:02 +0100 |
---|---|---|
committer | Marc Gilleron <marc.gilleron@gmail.com> | 2022-09-19 11:37:02 +0100 |
commit | 700bb066e0fbd6e24afcfde891481f728c364b48 (patch) | |
tree | 1a0cad575adf4fccf450fede280cde3d7857a029 | |
parent | 908795301b9e4fcf24b115329a48d7d295c13a1a (diff) |
Use `Vector2i` when returning atlas size in `Geometry2D::make_atlas`
-rw-r--r-- | core/core_bind.cpp | 3 | ||||
-rw-r--r-- | doc/classes/Geometry2D.xml | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp index ba48adff6a..f6d0a05e4c 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -810,14 +810,13 @@ Dictionary Geometry2D::make_atlas(const Vector<Size2> &p_rects) { ::Geometry2D::make_atlas(rects, result, size); - Size2 r_size = size; Vector<Point2> r_result; for (int i = 0; i < result.size(); i++) { r_result.push_back(result[i]); } ret["points"] = r_result; - ret["size"] = r_size; + ret["size"] = size; return ret; } diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml index 392ca2cabb..e613ab1a55 100644 --- a/doc/classes/Geometry2D.xml +++ b/doc/classes/Geometry2D.xml @@ -126,7 +126,7 @@ <return type="Dictionary" /> <param index="0" name="sizes" type="PackedVector2Array" /> <description> - Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: [code]points[/code] is an array of [Vector2] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2]. + Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: [code]points[/code] is a [PackedVector2Array] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2i]. </description> </method> <method name="merge_polygons"> |