More warnings/minor fixes

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@836 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2008-04-06 18:08:32 +00:00
parent 8c84621715
commit e6f466933d
23 changed files with 48 additions and 45 deletions
+2 -2
View File
@@ -161,11 +161,11 @@ int Style::update(Context& ctx) {
if (automatic_side & AUTO_LEFT) left = right - width;
else if (automatic_side & AUTO_WIDTH) width = right - left;
else if (automatic_side & AUTO_RIGHT) right = left + width;
else {int lr = left + right; left = (lr - width) / 2; right = (lr + width) / 2; }
else {int lr = int(left + right); left = (lr - width) / 2; right = (lr + width) / 2; }
if (automatic_side & AUTO_TOP) top = bottom - height;
else if (automatic_side & AUTO_HEIGHT) height = bottom - top;
else if (automatic_side & AUTO_BOTTOM) bottom = top + height;
else {int tb = top + bottom; top = (tb - height) / 2; bottom = (tb + height) / 2; }
else {int tb = int(top + bottom); top = (tb - height) / 2; bottom = (tb + height) / 2; }
// adjust rotation point
if (angle != 0 && (automatic_side & (AUTO_LEFT | AUTO_TOP))) {
double s = sin(angle * M_PI / 180), c = cos(angle * M_PI / 180);