r14815 by fschmid - Fixed Bug #8874: shape > edit > shrink by value is not "centered"

scribus-commit scribus-commit at lists.scribus.net
Thu Feb 25 19:42:47 CET 2010


Revision: 14815
Author: fschmid
Date: 2010-02-25T09:33:50.405906Z
Commit message: Fixed Bug #8874: shape > edit > shrink by value is not "centered"

Changeset: 
M  /trunk/Scribus/scribus/scribusview.cpp

Diffs:
Index: scribus/scribusview.cpp
===================================================================
--- scribus/scribusview.cpp	(revision 14814)
+++ scribus/scribusview.cpp	(revision 14815)
@@ -1498,6 +1498,8 @@
 	FPoint oldPos(currItem->xyPos());
 	double offsX = currItem->width() / 2.0;
 	double offsY = currItem->height() / 2.0;
+	double oldWidth = currItem->width();
+	double oldHeight = currItem->height();
 	ma.translate(-offsX, -offsY);
 	switch (mode)
 	{
@@ -1526,10 +1528,10 @@
 		ma.shear(0, 0.017455);
 		break;
 	case 8:
-		ma.scale(1.0 - (scaling / currItem->width()),1.0 - (scaling / currItem->height()));
+		ma.scale(1.0 - (scaling / oldWidth),1.0 - (scaling / oldHeight));
 		break;
 	case 9:
-		ma.scale(1.0 + (scaling / currItem->width()),1.0 + (scaling / currItem->height()));
+		ma.scale(1.0 + (scaling / oldWidth),1.0 + (scaling / oldHeight));
 		break;
 	}
 	currItem->PoLine.map(ma);
@@ -1567,10 +1569,10 @@
 		ma2.shear(0, 0.017455);
 		break;
 	case 8:
-		ma2.scale(1.0 - (scaling / currItem->width()),1.0 - (scaling / currItem->height()));
+		ma2.scale(1.0 - (scaling / oldWidth),1.0 - (scaling / oldHeight));
 		break;
 	case 9:
-		ma2.scale(1.0 + (scaling / currItem->width()),1.0 + (scaling / currItem->height()));
+		ma2.scale(1.0 + (scaling / oldWidth),1.0 + (scaling / oldHeight));
 		break;
 	}
 	double x = ma2.m11() * n.x() + ma2.m21() * n.y() + ma2.dx();




More information about the scribus-commit mailing list