fix: apply image slice scale after slice window to avoid mask issues

MSE draws masks on the slice window and expects the sizes to be equivalent. This was presenting problems with the way I was trying to do internal scale as I was applying the scale upfront as the slice window loads and would need to scale the mask to match. Instead, applying the scale only when the output is generated from the slice window.
This commit is contained in:
Brendan Hagan
2022-07-09 14:51:59 -04:00
parent 9fe75933dd
commit c5d2bcf9d0
3 changed files with 15 additions and 13 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ public:
/// Attempt to center the current constraints
void centerSelection();
/// Get the sliced image
Image getSlice() const;
Image getSlice(double scale = 1.0) const;
// Zoom factor
inline double zoomX() const { return target_size.GetWidth() / (double)selection.width; }
@@ -63,7 +63,7 @@ public:
ImageSliceWindow(Window* parent, const Image& source, const wxSize& target_size, const AlphaMask& target_mask);
/// Return the sliced image
Image getImage() const;
Image getImage(double scale) const;
// --------------------------------------------------- : Data
private: