Cleaned up the calculation of bounds of symbols, this fixes bounds calculation with symmetries.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1178 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-08-27 23:46:31 +00:00
parent 4b2a36bba8
commit ce906e83f8
11 changed files with 192 additions and 135 deletions
+1 -4
View File
@@ -71,7 +71,7 @@ class SymbolSelectEditor : public SymbolEditorBase {
SymbolPartRotateAction* rotateAction;
SymbolPartShearAction* shearAction;
// Bounding box of selection
Vector2D minV, maxV;
Bounds bounds;
// Where is the rotation center?
Vector2D center;
// What kind of clicking/dragging are we doing
@@ -112,9 +112,6 @@ class SymbolSelectEditor : public SymbolEditorBase {
/// Angle between center and pos
double angleTo(const Vector2D& pos);
/// Return the position of a handle, dx,dy in <-1, 0, 1>
Vector2D handlePos(int dx, int dy);
/// Update minV and maxV to be the bounding box of the selected_parts
/// Updates center to be the rotation center of the parts
void updateBoundingBox();