From 700bb066e0fbd6e24afcfde891481f728c364b48 Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Mon, 19 Sep 2022 11:37:02 +0100 Subject: [PATCH] Use `Vector2i` when returning atlas size in `Geometry2D::make_atlas` --- core/core_bind.cpp | 3 +-- 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 ba48adff6ab..f6d0a05e4ce 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -810,14 +810,13 @@ Dictionary Geometry2D::make_atlas(const Vector &p_rects) { ::Geometry2D::make_atlas(rects, result, size); - Size2 r_size = size; Vector 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 392ca2cabba..e613ab1a557 100644 --- a/doc/classes/Geometry2D.xml +++ b/doc/classes/Geometry2D.xml @@ -126,7 +126,7 @@ - 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].