mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Allow rotations when checking bounds of symbol parts.
This will be needed to determine the correct symbol size when there are symmetries. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@976 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+3
-1
@@ -7,6 +7,7 @@
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
#include <util/prec.hpp>
|
||||
#include <util/rotation.hpp>
|
||||
#include <data/symbol.hpp>
|
||||
#include <script/to_value.hpp>
|
||||
#include <gfx/bezier.hpp>
|
||||
@@ -184,8 +185,9 @@ void SymbolShape::enforceConstraints() {
|
||||
void SymbolShape::calculateBounds() {
|
||||
min_pos = Vector2D::infinity();
|
||||
max_pos = -Vector2D::infinity();
|
||||
Rotation rot(0);
|
||||
for (int i = 0 ; i < (int)points.size() ; ++i) {
|
||||
segment_bounds(*getPoint(i), *getPoint(i + 1), min_pos, max_pos);
|
||||
segment_bounds(rot, *getPoint(i), *getPoint(i + 1), min_pos, max_pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user