r14855 by fschmid - Transparency Masks: fixed incorrect export to PDF when groups are rotated.

scribus-commit scribus-commit at lists.scribus.net
Mon Mar 8 12:10:22 CET 2010


Revision: 14855
Author: fschmid
Date: 2010-03-08T11:09:11.744188Z
Commit message: Transparency Masks: fixed incorrect export to PDF when groups are rotated.

Changeset: 
M  /trunk/Scribus/scribus/pdflib_core.cpp

Diffs:
Index: scribus/pdflib_core.cpp
===================================================================
--- scribus/pdflib_core.cpp	(revision 14854)
+++ scribus/pdflib_core.cpp	(revision 14855)
@@ -5943,7 +5943,12 @@
 		PutDoc(">>\n");
 		QString stre = "q\n";
 		if (currItem->isGroupControl)
-			stre += "1 0 0 1 "+ FToStr(currItem->xPos() - ActPageP->xOffset()) + " " + FToStr(ActPageP->height() - (currItem->yPos() - ActPageP->yOffset())) + " cm\n";
+		{
+			QTransform mpa;
+			mpa.translate(currItem->xPos() - ActPageP->xOffset(), ActPageP->height() - (currItem->yPos() - ActPageP->yOffset()));
+			mpa.rotate(-currItem->rotation());
+			stre += FToStr(mpa.m11())+" "+FToStr(mpa.m12())+" "+FToStr(mpa.m21())+" "+FToStr(mpa.m22())+" "+FToStr(mpa.dx())+" "+FToStr(mpa.dy())+" cm\n";
+		}
 		stre += SetClipPath(currItem)+"h\n";
 		stre += FToStr(fabs(currItem->lineWidth()))+" w\n";
 		stre += "/Pattern cs\n";
@@ -6002,7 +6007,12 @@
 		PutDoc(">>\n");
 		QString stre = "q\n";
 		if (currItem->isGroupControl)
-			stre += "1 0 0 1 "+ FToStr(currItem->xPos() - ActPageP->xOffset()) + " " + FToStr(ActPageP->height() - (currItem->yPos() - ActPageP->yOffset())) + " cm\n";
+		{
+			QTransform mpa;
+			mpa.translate(currItem->xPos() - ActPageP->xOffset(), ActPageP->height() - (currItem->yPos() - ActPageP->yOffset()));
+			mpa.rotate(-currItem->rotation());
+			stre += FToStr(mpa.m11())+" "+FToStr(mpa.m12())+" "+FToStr(mpa.m21())+" "+FToStr(mpa.m22())+" "+FToStr(mpa.dx())+" "+FToStr(mpa.dy())+" cm\n";
+		}
 		stre += SetClipPath(currItem)+"h\n";
 		stre += FToStr(fabs(currItem->lineWidth()))+" w\n";
 		stre += tmpOut+" f*\n";




More information about the scribus-commit mailing list