diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-09-29 07:40:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-29 07:40:52 +0200 |
commit | ad635567b1964c3e573dedd158cf9dab09364fec (patch) | |
tree | 385f76b6b2869666120a9afdee99ba88c75aacaf /core | |
parent | 1bf0e875d86325249d5dcecddf69edc274ada8e5 (diff) | |
parent | fc9767abb14348c2236b487f0bc6d18de65a38fd (diff) |
Merge pull request #53189 from AnilBK/use-class-specific-funcs
Diffstat (limited to 'core')
-rw-r--r-- | core/io/image.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/io/image.cpp b/core/io/image.cpp index 3112dd217f..c70f4b86bd 100644 --- a/core/io/image.cpp +++ b/core/io/image.cpp @@ -2506,7 +2506,7 @@ void Image::blit_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const Po clipped_src_rect.position.y = ABS(p_dest.y); } - if (clipped_src_rect.size.x <= 0 || clipped_src_rect.size.y <= 0) { + if (clipped_src_rect.has_no_area()) { return; } @@ -2561,7 +2561,7 @@ void Image::blit_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, co clipped_src_rect.position.y = ABS(p_dest.y); } - if (clipped_src_rect.size.x <= 0 || clipped_src_rect.size.y <= 0) { + if (clipped_src_rect.has_no_area()) { return; } @@ -2615,7 +2615,7 @@ void Image::blend_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const P clipped_src_rect.position.y = ABS(p_dest.y); } - if (clipped_src_rect.size.x <= 0 || clipped_src_rect.size.y <= 0) { + if (clipped_src_rect.has_no_area()) { return; } @@ -2664,7 +2664,7 @@ void Image::blend_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, c clipped_src_rect.position.y = ABS(p_dest.y); } - if (clipped_src_rect.size.x <= 0 || clipped_src_rect.size.y <= 0) { + if (clipped_src_rect.has_no_area()) { return; } |