mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
New rotation system (see forum thread).
Major changes: - when rotating, the top left corner of the rectangle stays in place. - ValueViewers get a dc that is pre-rotated/translated for them, i.e. (0,0) is the top-left of the viewer (with ValueViewer::getRotation). - moved 'angle' from individual Styles to the Style base class. - any rotation angle is now possible. angle is still an int for now. This warrants a version bump git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@782 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -51,6 +51,11 @@ class ValueViewer : public StyleListener {
|
||||
/// Get a bounding rectangle for this field (including any border it may have)
|
||||
virtual RealRect boundingBox() const;
|
||||
|
||||
/// Rotation to use for drawing this field
|
||||
virtual Rotation getRotation() const;
|
||||
/// Stretch factor
|
||||
virtual double getStretch() const { return 1.0; }
|
||||
|
||||
/// Called when the associated value is changed
|
||||
/** Both when we are associated with another value,
|
||||
* and by default when the value itself changes (called from onAction)
|
||||
|
||||
Reference in New Issue
Block a user