mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
Removed last of the BeginDrawing/EndDrawing calls;
Added english_number_ordinal script function; Working on symbols with a different aspect ratio (i.e. wider/smaller symbols) git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@558 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -280,6 +280,17 @@ IMPLEMENT_REFLECTION(Symbol) {
|
||||
REFLECT_IF_READING calculateBoundsNonRec();
|
||||
}
|
||||
|
||||
double Symbol::aspectRatio() const {
|
||||
double margin_x = min(0.4999, max(0., min(min_pos.x, 1-max_pos.x)));
|
||||
double margin_y = min(0.4999, max(0., min(min_pos.y, 1-max_pos.y)));
|
||||
double delta = 2 * (margin_y - margin_x);
|
||||
if (delta > 0) {
|
||||
return 1 / (1 - delta);
|
||||
} else {
|
||||
return 1 + delta;
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Default symbol
|
||||
|
||||
// A default symbol part, a square, moved by d
|
||||
|
||||
Reference in New Issue
Block a user