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:
twanvl
2008-06-05 20:17:32 +00:00
parent 5ae7f6b3ab
commit 08a156c113
7 changed files with 36 additions and 20 deletions
+3 -1
View File
@@ -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);
}
}