diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2019-10-06 18:45:24 +0200 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2019-10-07 13:19:30 +0200 |
commit | 1e301479dae4e4e5bdf4637669d990a7731b2fe3 (patch) | |
tree | 66ecfbefb4fa20adf03d79eaee779915fabbc63b /scene/resources/bit_map.h | |
parent | 1d9233c3882afe888b9396f7f2aac917d4dcac4d (diff) |
Sprite to polygon conversion improvements
- No reduced Rect in march square algorithm, it was causing inconsistent cases near the borders and made the outline less accurate
- Ignore invalid generated polygons (under 3 points) to avoid unnecessary errors and crashes
- Error popup only when no polygon could be generated at all
- Added option to shrink pixels (to get rid of small separate islands)
- Fixed polygon preview (lines were sometimes not showing along the borders)
Fixes #32564, #29267
Diffstat (limited to 'scene/resources/bit_map.h')
-rw-r--r-- | scene/resources/bit_map.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/resources/bit_map.h b/scene/resources/bit_map.h index daf24affb1..b062dd7376 100644 --- a/scene/resources/bit_map.h +++ b/scene/resources/bit_map.h @@ -67,6 +67,7 @@ public: void resize(const Size2 &p_new_size); void grow_mask(int p_pixels, const Rect2 &p_rect); + void shrink_mask(int p_pixels, const Rect2 &p_rect); void blit(const Vector2 &p_pos, const Ref<BitMap> &p_bitmap); Ref<Image> convert_to_image() const; |