r21103 by fschmid -
scribus-commit
scribus-commit at lists.scribus.net
Mon Mar 21 19:25:40 UTC 2016
Author: fschmid
Date: Mon Mar 21 19:25:40 2016
New Revision: 21103
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21103
Log:
Fixed Bug #8988: expanding the countour line does not respect the measures
Modified:
trunk/Scribus/scribus/scribusview.cpp
Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21103&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Mon Mar 21 19:25:40 2016
@@ -1410,6 +1410,7 @@
{
FPoint tp2(getMinClipF(&currItem->ContourLine));
FPoint tp(getMaxClipF(&currItem->ContourLine));
+ FPoint tpS = currItem->ContourLine.WidthHeight();
currItem->ContourLine.translate(-qRound((tp.x() + tp2.x()) / 2.0), -qRound((tp.y() + tp2.y()) / 2.0));
switch (mode)
{
@@ -1438,18 +1439,10 @@
ma.shear(0, 0.017455);
break;
case 8:
- {
- 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);
- }
+ ma.scale(1.0 - (scaling / tpS.x()),1.0 - (scaling / tpS.y()));
break;
case 9:
- {
- 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);
- }
+ ma.scale(1.0 + (scaling / tpS.x()),1.0 + (scaling / tpS.y()));
break;
//10-13 are for scaling the contour line in shape edit mode
case 10:
More information about the scribus-commit
mailing list