summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-19 15:32:28 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-19 15:32:28 +0200
commit2d01768618f2affebceb6beb1410266c04e47388 (patch)
tree2b4a747adfd8b4716f49c6254c372a135b3d98aa
parentd4f841858249075614fa553390774a8ad6c3ba36 (diff)
parent700bb066e0fbd6e24afcfde891481f728c364b48 (diff)
Merge pull request #66097 from Zylann/make_atlas_vec2i
make_atlas`
-rw-r--r--core/core_bind.cpp3
-rw-r--r--doc/classes/Geometry2D.xml2
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">