diff options
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/animation.cpp | 2 | ||||
-rw-r--r-- | scene/resources/animation.h | 2 | ||||
-rw-r--r-- | scene/resources/bit_map.cpp | 6 | ||||
-rw-r--r-- | scene/resources/texture.cpp | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index a7a02361a9..f4670ca850 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -33,8 +33,6 @@ #include "core/math/geometry_3d.h" -#define ANIM_MIN_LENGTH 0.001 - bool Animation::_set(const StringName &p_name, const Variant &p_value) { String name = p_name; diff --git a/scene/resources/animation.h b/scene/resources/animation.h index 060d1fe2d9..650a54ebfc 100644 --- a/scene/resources/animation.h +++ b/scene/resources/animation.h @@ -33,6 +33,8 @@ #include "core/io/resource.h" +#define ANIM_MIN_LENGTH 0.001 + class Animation : public Resource { GDCLASS(Animation, Resource); RES_BASE_EXTENSION("anim"); diff --git a/scene/resources/bit_map.cpp b/scene/resources/bit_map.cpp index 10f0de8ff8..d07447179d 100644 --- a/scene/resources/bit_map.cpp +++ b/scene/resources/bit_map.cpp @@ -63,7 +63,7 @@ void BitMap::create_from_image_alpha(const Ref<Image> &p_image, float p_threshol } void BitMap::set_bit_rect(const Rect2 &p_rect, bool p_value) { - Rect2i current = Rect2i(0, 0, width, height).clip(p_rect); + Rect2i current = Rect2i(0, 0, width, height).intersection(p_rect); uint8_t *data = bitmask.ptrw(); for (int i = current.position.x; i < current.position.x + current.size.x; i++) { @@ -482,7 +482,7 @@ static void fill_bits(const BitMap *p_src, Ref<BitMap> &p_map, const Point2i &p_ } Vector<Vector<Vector2>> BitMap::clip_opaque_to_polygons(const Rect2 &p_rect, float p_epsilon) const { - Rect2i r = Rect2i(0, 0, width, height).clip(p_rect); + Rect2i r = Rect2i(0, 0, width, height).intersection(p_rect); print_verbose("BitMap: Rect: " + r); Point2i from; @@ -522,7 +522,7 @@ void BitMap::grow_mask(int p_pixels, const Rect2 &p_rect) { bool bit_value = p_pixels > 0; p_pixels = Math::abs(p_pixels); - Rect2i r = Rect2i(0, 0, width, height).clip(p_rect); + Rect2i r = Rect2i(0, 0, width, height).intersection(p_rect); Ref<BitMap> copy; copy.instance(); diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 1507537cd0..706b18d2b5 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -1253,7 +1253,7 @@ bool AtlasTexture::get_rect_region(const Rect2 &p_rect, const Rect2 &p_src_rect, Vector2 scale = p_rect.size / src.size; src.position += (rc.position - margin.position); - Rect2 src_c = rc.clip(src); + Rect2 src_c = rc.intersection(src); if (src_c.size == Size2()) { return false; } @@ -1575,7 +1575,7 @@ void LargeTexture::draw_rect_region(RID p_canvas_item, const Rect2 &p_rect, cons if (!p_src_rect.intersects(rect)) { continue; } - Rect2 local = p_src_rect.clip(rect); + Rect2 local = p_src_rect.intersection(rect); Rect2 target = local; target.size *= scale; target.position = p_rect.position + (p_src_rect.position + rect.position) * scale; |