summaryrefslogtreecommitdiff
path: root/core/io/image.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/io/image.cpp')
-rw-r--r--core/io/image.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/io/image.cpp b/core/io/image.cpp
index 6a049014bc..65addaf964 100644
--- a/core/io/image.cpp
+++ b/core/io/image.cpp
@@ -2636,9 +2636,9 @@ Rect2i Image::get_used_rect() const {
}
}
-Ref<Image> Image::get_rect(const Rect2i &p_area) const {
- Ref<Image> img = memnew(Image(p_area.size.x, p_area.size.y, mipmaps, format));
- img->blit_rect(Ref<Image>((Image *)this), p_area, Point2i(0, 0));
+Ref<Image> Image::get_region(const Rect2i &p_region) const {
+ Ref<Image> img = memnew(Image(p_region.size.x, p_region.size.y, mipmaps, format));
+ img->blit_rect(Ref<Image>((Image *)this), p_region, Point2i(0, 0));
return img;
}
@@ -3362,7 +3362,7 @@ void Image::_bind_methods() {
ClassDB::bind_method(D_METHOD("fill_rect", "rect", "color"), &Image::fill_rect);
ClassDB::bind_method(D_METHOD("get_used_rect"), &Image::get_used_rect);
- ClassDB::bind_method(D_METHOD("get_rect", "rect"), &Image::get_rect);
+ ClassDB::bind_method(D_METHOD("get_region", "region"), &Image::get_region);
ClassDB::bind_method(D_METHOD("copy_from", "src"), &Image::copy_internals_from);