diff options
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/texture.cpp | 4 | ||||
-rw-r--r-- | scene/resources/texture.h | 2 | ||||
-rw-r--r-- | scene/resources/tile_set.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 3a8f50c3c3..21ae62c92e 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -300,8 +300,8 @@ bool ImageTexture::is_pixel_opaque(int p_x, int p_y) const { return true; } -void ImageTexture::set_size_override(const Size2 &p_size) { - Size2 s = p_size; +void ImageTexture::set_size_override(const Size2i &p_size) { + Size2i s = p_size; if (s.x != 0) { w = s.x; } diff --git a/scene/resources/texture.h b/scene/resources/texture.h index 5973643034..b107a2a70d 100644 --- a/scene/resources/texture.h +++ b/scene/resources/texture.h @@ -130,7 +130,7 @@ public: bool is_pixel_opaque(int p_x, int p_y) const override; - void set_size_override(const Size2 &p_size); + void set_size_override(const Size2i &p_size); virtual void set_path(const String &p_path, bool p_take_over = false) override; diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index 139ffaf510..22b5ef0108 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -1801,9 +1801,9 @@ Vector<Vector<Ref<Texture2D>>> TileSet::generate_terrains_icons(Size2i p_size) { if (counts[terrain_set][terrain].count > 0) { // Get the best tile. Ref<Texture2D> texture = counts[terrain_set][terrain].texture; - Rect2 region = counts[terrain_set][terrain].region; + Rect2i region = counts[terrain_set][terrain].region; image->create(region.size.x, region.size.y, false, Image::FORMAT_RGBA8); - image->blit_rect(texture->get_image(), region, Point2()); + image->blit_rect(texture->get_image(), region, Point2i()); image->resize(p_size.x, p_size.y, Image::INTERPOLATE_NEAREST); } else { image->create(1, 1, false, Image::FORMAT_RGBA8); |