mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 05:36:59 -04:00
Image slicer spin boxes can now always be changed (within bounds), without being constrained back.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@665 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -19,6 +19,13 @@ DECLARE_POINTER_TYPE(AlphaMask);
|
||||
|
||||
// ----------------------------------------------------------------------------- : ImageSlice
|
||||
|
||||
/// Which option is just changed, and therefore more important?
|
||||
enum PreferedProperty
|
||||
{ PREFER_NONE
|
||||
, PREFER_WIDTH
|
||||
, PREFER_HEIGHT
|
||||
};
|
||||
|
||||
/// A slice of an image, i.e. a selected rectangle
|
||||
class ImageSlice {
|
||||
public:
|
||||
@@ -35,7 +42,7 @@ class ImageSlice {
|
||||
int sharpen_amount;
|
||||
|
||||
/// Enforce relations between values
|
||||
void constrain();
|
||||
void constrain(PreferedProperty prefer = PREFER_NONE);
|
||||
/// Get the sliced image
|
||||
Image getSlice() const;
|
||||
|
||||
@@ -97,7 +104,7 @@ class ImageSliceWindow : public wxDialog {
|
||||
// --------------------------------------------------- : Updating
|
||||
|
||||
// The manual controls were changed
|
||||
void onUpdateFromControl();
|
||||
void onUpdateFromControl(PreferedProperty prefer = PREFER_NONE);
|
||||
// Update the values in the controls
|
||||
void updateControls();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user