mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57: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:
@@ -44,7 +44,6 @@ TextStyle::TextStyle(const TextFieldP& field)
|
||||
: Style(field)
|
||||
, always_symbol(false), allow_formating(true)
|
||||
, alignment(ALIGN_TOP_LEFT)
|
||||
, angle(0)
|
||||
, padding_left (0), padding_left_min (10000)
|
||||
, padding_right (0), padding_right_min (10000)
|
||||
, padding_top (0), padding_top_min (10000)
|
||||
@@ -73,8 +72,7 @@ int TextStyle::update(Context& ctx) {
|
||||
return Style ::update(ctx)
|
||||
| font .update(ctx) * CHANGE_OTHER
|
||||
| symbol_font.update(ctx) * CHANGE_OTHER
|
||||
| alignment .update(ctx) * CHANGE_OTHER
|
||||
| angle .update(ctx) * CHANGE_OTHER;
|
||||
| alignment .update(ctx) * CHANGE_OTHER;
|
||||
}
|
||||
void TextStyle::initDependencies(Context& ctx, const Dependency& dep) const {
|
||||
Style ::initDependencies(ctx, dep);
|
||||
@@ -100,7 +98,6 @@ IMPLEMENT_REFLECTION(TextStyle) {
|
||||
REFLECT(always_symbol);
|
||||
REFLECT(allow_formating);
|
||||
REFLECT(alignment);
|
||||
REFLECT(angle);
|
||||
REFLECT(padding_left);
|
||||
REFLECT(padding_right);
|
||||
REFLECT(padding_top);
|
||||
|
||||
Reference in New Issue
Block a user