r17280 by fschmid - Fixed the "setPolyClip" function that missed the last path point.

scribus-commit scribus-commit at lists.scribus.net
Sun Feb 5 11:56:30 UTC 2012


Author: fschmid
Date: Sun Feb  5 11:56:29 2012
New Revision: 17280

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17280
Log:
Fixed the "setPolyClip" function that missed the last path point.

Modified:
    trunk/Scribus/scribus/pageitem.cpp

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17280&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Sun Feb  5 11:56:29 2012
@@ -6872,7 +6872,15 @@
 	}
 	QPoint np, np2;
 	QPolygon cl, cl1, cl2;
-	cl = FlattenPath(PoLine, Segments);
+	Segments.clear();
+	QPainterPath pa = PoLine.toQPainterPath(false);
+	QList<QPolygonF> polist = pa.toSubpathPolygons();
+	for (int a = 0; a < polist.count(); a++)
+	{
+		QPolygon cli = polist[a].toPolygon();
+		cl += cli;
+		Segments.append(cl.size());
+	}
 	if (cl.size() > 1)
 	{
 		Clip.resize(0);




More information about the scribus-commit mailing list