r14644 by fschmid - DRW Importer: improved elliptical Arcs.

scribus-commit scribus-commit at lists.scribus.net
Fri Feb 5 14:20:22 CET 2010


Revision: 14644
Author: fschmid
Date: 2010-02-05T13:16:58.346817Z
Commit message: DRW Importer: improved elliptical Arcs.

Changeset: 
M  /trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp

Diffs:
Index: scribus/plugins/import/drw/importdrw.cpp
===================================================================
--- scribus/plugins/import/drw/importdrw.cpp	(revision 14643)
+++ scribus/plugins/import/drw/importdrw.cpp	(revision 14644)
@@ -1269,6 +1269,8 @@
 			path = QPainterPath();
 			path.arcMoveTo(bBoxO, rotS);
 			path.arcTo(bBoxO, rotS, rotE);
+			scaleX = 1;
+			scaleY = 1;
 			z = m_Doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, posX, posY, bBox.width(), bBox.height(), lineWidth, fillC, lineColor, true);
 			currentItem = m_Doc->Items->at(z);
 			currentItem->PoLine.fromQPainterPath(path);
@@ -1466,12 +1468,14 @@
 			eLin = QLineF(bBoxO.center(), posEnd);
 			rotS = sLin.angle();
 			rotE = eLin.angle();
-		//	if (rotS > rotE)
-		//		rotS = rotS - 360;
-			rotE = rotE - rotS;
+			if (rotS < rotE)
+				rotS = rotS + 360;
+			rotE = rotS - rotE;
 			path = QPainterPath();
 			path.arcMoveTo(bBoxO, rotS);
-			path.arcTo(bBoxO, rotS, rotE);
+			path.arcTo(bBoxO, rotS, -rotE);
+			scaleX = 1;
+			scaleY = 1;
 			z = m_Doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, posX, posY, bBox.width(), bBox.height(), lineWidth, fillC, lineColor, true);
 			currentItem = m_Doc->Items->at(z);
 			currentItem->PoLine.fromQPainterPath(path);
@@ -1495,7 +1499,6 @@
 			path = QPainterPath();
 			path.moveTo(posStart);
 			path.cubicTo(posMid, posMid, posEnd);
-//			path.quadTo(posMid, posEnd);
 			z = m_Doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, posX, posY, bBox.width(), bBox.height(), lineWidth, fillC, lineColor, true);
 			currentItem = m_Doc->Items->at(z);
 			currentItem->PoLine.fromQPainterPath(path);
@@ -1579,7 +1582,6 @@
 			path = QPainterPath();
 			path.moveTo(posStart);
 			path.cubicTo(posMid, posMid, posEnd);
-		//	path.quadTo(posMid, posEnd);
 			z = m_Doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, posX, posY, bBox.width(), bBox.height(), lineWidth, fillC, lineColor, true);
 			currentItem = m_Doc->Items->at(z);
 			currentItem->PoLine.fromQPainterPath(path);




More information about the scribus-commit mailing list