mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user