r14814 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:40:36 CET 2010


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

Changeset: 
M  /branches/Version135/Scribus/scribus/scribusview.cpp

Diffs:
Index: scribus/scribusview.cpp
===================================================================
--- scribus/scribusview.cpp	(revision 14813)
+++ scribus/scribusview.cpp	(revision 14814)
@@ -1494,6 +1494,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)
 	{
@@ -1522,10 +1524,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);
@@ -1563,10 +1565,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