r16671 by craig - #9392: Fix contour line scaling by distance

scribus-commit scribus-commit at lists.scribus.net
Thu Jun 16 22:13:46 UTC 2011


Author: craig
Date: Thu Jun 16 22:13:46 2011
New Revision: 16671

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16671
Log:
#9392: Fix contour line scaling by distance

Modified:
    branches/Version135/Scribus/scribus/scribusview.cpp

Modified: branches/Version135/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16671&path=/branches/Version135/Scribus/scribus/scribusview.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/scribusview.cpp (original)
+++ branches/Version135/Scribus/scribus/scribusview.cpp Thu Jun 16 22:13:46 2011
@@ -1437,10 +1437,18 @@
 			ma.shear(0, 0.017455);
 			break;
 		case 8:
-			ma.scale(1.0 - (scaling / 100.0), 1.0 - (scaling / 100.0));
+			{
+				double sx=(tp.x() - tp2.x() - scaling) / (tp.x() - tp2.x());
+				double sy=(tp.y() - tp2.y() - scaling) / (tp.y() - tp2.y());
+				ma.scale(sx, sy);
+			}
 			break;
 		case 9:
-			ma.scale(1.0 + (scaling / 100.0), 1.0 + (scaling / 100.0));
+			{
+				double sx=(tp.x() - tp2.x() + scaling) / (tp.x() - tp2.x());
+				double sy=(tp.y() - tp2.y() + scaling) / (tp.y() - tp2.y());
+				ma.scale(sx, sy);
+			}
 			break;
 		//10-13 are for scaling the contour line in shape edit mode
 		case 10:




More information about the scribus-commit mailing list