summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/import/resource_importer_layered_texture.cpp2
-rw-r--r--editor/import/resource_importer_texture_atlas.cpp8
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp4
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp2
4 files changed, 8 insertions, 8 deletions
diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp
index bacd09592e..a5dfd67d18 100644
--- a/editor/import/resource_importer_layered_texture.cpp
+++ b/editor/import/resource_importer_layered_texture.cpp
@@ -367,7 +367,7 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
for (int j = 0; j < hslices; j++) {
int x = slice_w * j;
int y = slice_h * i;
- Ref<Image> slice = image->get_rect(Rect2(x, y, slice_w, slice_h));
+ Ref<Image> slice = image->get_rect(Rect2i(x, y, slice_w, slice_h));
ERR_CONTINUE(slice.is_null() || slice->is_empty());
if (slice->get_width() != slice_w || slice->get_height() != slice_h) {
slice->resize(slice_w, slice_h);
diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp
index 28653dac3e..93afb3381e 100644
--- a/editor/import/resource_importer_texture_atlas.cpp
+++ b/editor/import/resource_importer_texture_atlas.cpp
@@ -212,7 +212,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
EditorAtlasPacker::Chart chart;
- Rect2 used_rect = Rect2(Vector2(), image->get_size());
+ Rect2i used_rect = Rect2i(Vector2i(), image->get_size());
if (trim_alpha_border_from_region) {
// Clip a region from the image.
used_rect = image->get_used_rect();
@@ -220,9 +220,9 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
pack_data.region = used_rect;
chart.vertices.push_back(used_rect.position);
- chart.vertices.push_back(used_rect.position + Vector2(used_rect.size.x, 0));
- chart.vertices.push_back(used_rect.position + Vector2(used_rect.size.x, used_rect.size.y));
- chart.vertices.push_back(used_rect.position + Vector2(0, used_rect.size.y));
+ chart.vertices.push_back(used_rect.position + Vector2i(used_rect.size.x, 0));
+ chart.vertices.push_back(used_rect.position + Vector2i(used_rect.size.x, used_rect.size.y));
+ chart.vertices.push_back(used_rect.position + Vector2i(0, used_rect.size.y));
EditorAtlasPacker::Chart::Face f;
f.vertex[0] = 0;
f.vertex[1] = 1;
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 3d4701a54a..f493c4515c 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -132,8 +132,8 @@ void AnimationPlayerEditor::_notification(int p_what) {
Size2 icon_size = autoplay_img->get_size();
autoplay_reset_img.instantiate();
autoplay_reset_img->create(icon_size.x * 2, icon_size.y, false, autoplay_img->get_format());
- autoplay_reset_img->blit_rect(autoplay_img, Rect2(Point2(), icon_size), Point2());
- autoplay_reset_img->blit_rect(reset_img, Rect2(Point2(), icon_size), Point2(icon_size.x, 0));
+ autoplay_reset_img->blit_rect(autoplay_img, Rect2i(Point2i(), icon_size), Point2i());
+ autoplay_reset_img->blit_rect(reset_img, Rect2i(Point2i(), icon_size), Point2i(icon_size.x, 0));
autoplay_reset_icon.instantiate();
autoplay_reset_icon->set_image(autoplay_reset_img);
}
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index bc95624dd5..f89e387f92 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -161,7 +161,7 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const
Ref<Image> overlay = previews->get_theme_icon(SNAME("PlayOverlay"), SNAME("EditorIcons"))->get_image();
Ref<Image> thumbnail = p_image->get_image();
thumbnail = thumbnail->duplicate();
- Point2 overlay_pos = Point2((thumbnail->get_width() - overlay->get_width()) / 2, (thumbnail->get_height() - overlay->get_height()) / 2);
+ Point2i overlay_pos = Point2i((thumbnail->get_width() - overlay->get_width()) / 2, (thumbnail->get_height() - overlay->get_height()) / 2);
// Overlay and thumbnail need the same format for `blend_rect` to work.
thumbnail->convert(Image::FORMAT_RGBA8);