r14859 by fschmid - Fixed pattern masks for rotated groups.

scribus-commit scribus-commit at lists.scribus.net
Mon Mar 8 19:20:48 CET 2010


Revision: 14859
Author: fschmid
Date: 2010-03-08T18:17:27.295979Z
Commit message: Fixed pattern masks for rotated groups.

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

Diffs:
Index: scribus/pdflib_core.cpp
===================================================================
--- scribus/pdflib_core.cpp	(revision 14858)
+++ scribus/pdflib_core.cpp	(revision 14859)
@@ -6224,7 +6224,10 @@
 	else if (kind == 2)
 	{
 		if (currItem->isGroupControl)
+		{
 			mpa.translate(currItem->xPos() - ActPageP->xOffset(), ActPageP->height() - (currItem->yPos() - ActPageP->yOffset()));
+			mpa.rotate(-currItem->rotation());
+		}
 		currItem->maskTransform(patternScaleX, patternScaleY, patternOffsetX, patternOffsetY, patternRotation, patternSkewX, patternSkewY);
 		currItem->maskFlip(mirrorX, mirrorY);
 	}
Index: scribus/canvas.cpp
===================================================================
--- scribus/canvas.cpp	(revision 14858)
+++ scribus/canvas.cpp	(revision 14859)
@@ -1456,7 +1456,7 @@
 					painter->setMaskMode(0);
 				else
 				{
-					painter->setPatternMask(&m_doc->docPatterns[currItem->patternMask()], currItem->patternMaskScaleX, currItem->patternMaskScaleY, currItem->patternMaskOffsetX + currItem->xPos(), currItem->patternMaskOffsetY + currItem->yPos(), currItem->patternMaskRotation, currItem->patternMaskSkewX, currItem->patternMaskSkewY, currItem->patternMaskMirrorX, currItem->patternMaskMirrorY);
+					painter->setPatternMask(&m_doc->docPatterns[currItem->patternMask()], currItem->patternMaskScaleX, currItem->patternMaskScaleY, currItem->patternMaskOffsetX + currItem->xPos(), currItem->patternMaskOffsetY + currItem->yPos(), currItem->patternMaskRotation + currItem->rotation(), currItem->patternMaskSkewX, currItem->patternMaskSkewY, currItem->patternMaskMirrorX, currItem->patternMaskMirrorY);
 					if (currItem->maskType() == 3)
 						painter->setMaskMode(2);
 					else
@@ -1682,7 +1682,7 @@
 					painter->setMaskMode(0);
 				else
 				{
-					painter->setPatternMask(&m_doc->docPatterns[currItem->patternMask()], currItem->patternMaskScaleX, currItem->patternMaskScaleY, currItem->patternMaskOffsetX + currItem->xPos(), currItem->patternMaskOffsetY + currItem->yPos(), currItem->patternMaskRotation, currItem->patternMaskSkewX, currItem->patternMaskSkewY, currItem->patternMaskMirrorX, currItem->patternMaskMirrorY);
+					painter->setPatternMask(&m_doc->docPatterns[currItem->patternMask()], currItem->patternMaskScaleX, currItem->patternMaskScaleY, currItem->patternMaskOffsetX + currItem->xPos(), currItem->patternMaskOffsetY + currItem->yPos(), currItem->patternMaskRotation + currItem->rotation(), currItem->patternMaskSkewX, currItem->patternMaskSkewY, currItem->patternMaskMirrorX, currItem->patternMaskMirrorY);
 					if (currItem->maskType() == 3)
 						painter->setMaskMode(2);
 					else
Index: scribus/pageitem.cpp
===================================================================
--- scribus/pageitem.cpp	(revision 14858)
+++ scribus/pageitem.cpp	(revision 14859)
@@ -1680,7 +1680,7 @@
 					p->setMaskMode(0);
 				else
 				{
-					p->setPatternMask(&m_Doc->docPatterns[embedded->patternMask()], embedded->patternMaskScaleX, embedded->patternMaskScaleY, embedded->patternMaskOffsetX + embedded->xPos(), embedded->patternMaskOffsetY + embedded->yPos(), embedded->patternMaskRotation, embedded->patternMaskSkewX, embedded->patternMaskSkewY, embedded->patternMaskMirrorX, embedded->patternMaskMirrorY);
+					p->setPatternMask(&m_Doc->docPatterns[embedded->patternMask()], embedded->patternMaskScaleX, embedded->patternMaskScaleY, embedded->patternMaskOffsetX + embedded->xPos(), embedded->patternMaskOffsetY + embedded->yPos(), embedded->patternMaskRotation + embedded->rotation(), embedded->patternMaskSkewX, embedded->patternMaskSkewY, embedded->patternMaskMirrorX, embedded->patternMaskMirrorY);
 					if (embedded->GrMask == 3)
 						p->setMaskMode(2);
 					else
@@ -2042,7 +2042,7 @@
 					painter->setMaskMode(0);
 				else
 				{
-					painter->setPatternMask(&m_Doc->docPatterns[embedded->patternMask()], embedded->patternMaskScaleX, embedded->patternMaskScaleY, embedded->patternMaskOffsetX + embedded->xPos(), embedded->patternMaskOffsetY + embedded->yPos(), embedded->patternMaskRotation, embedded->patternMaskSkewX, embedded->patternMaskSkewY, embedded->patternMaskMirrorX, embedded->patternMaskMirrorY);
+					painter->setPatternMask(&m_Doc->docPatterns[embedded->patternMask()], embedded->patternMaskScaleX, embedded->patternMaskScaleY, embedded->patternMaskOffsetX + embedded->xPos(), embedded->patternMaskOffsetY + embedded->yPos(), embedded->patternMaskRotation + embedded->rotation(), embedded->patternMaskSkewX, embedded->patternMaskSkewY, embedded->patternMaskMirrorX, embedded->patternMaskMirrorY);
 					if (embedded->GrMask == 3)
 						painter->setMaskMode(2);
 					else




More information about the scribus-commit mailing list