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
This commit is contained in:
PouleyKetchoupp
2019-10-06 18:45:24 +02:00
parent 1d9233c388
commit 1e301479da
4 changed files with 91 additions and 46 deletions
+2 -1
View File
@@ -67,7 +67,8 @@ class SpriteEditor : public Control {
Vector<int> computed_indices;
SpinBox *simplification;
SpinBox *island_merging;
SpinBox *grow_pixels;
SpinBox *shrink_pixels;
Button *update_preview;
void _menu_option(int p_option);