r19984 by fschmid - Fixed Bug #12990: Gradients are being exported with an offset, applied patch from Jean.

scribus-commit scribus-commit at lists.scribus.net
Thu Apr 9 18:41:14 UTC 2015


Author: fschmid
Date: Thu Apr  9 18:41:14 2015
New Revision: 19984

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19984
Log:
Fixed Bug #12990: Gradients are being exported with an offset, applied patch from Jean.

Modified:
    trunk/Scribus/scribus/pdflib_core.cpp

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19984&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Thu Apr  9 18:41:14 2015
@@ -6145,12 +6145,12 @@
 		double StartX, StartY, EndX, EndY, FocalX, FocalY, Gscale, Gskew;
 		int GType;
 		GType = currItem->GrMask;
-		StartX = currItem->GrMaskStartX + bleedDisplacementX;
-		StartY = currItem->GrMaskStartY + bleedDisplacementY;
-		EndX = currItem->GrMaskEndX + bleedDisplacementX;
-		EndY = currItem->GrMaskEndY + bleedDisplacementY;
-		FocalX = currItem->GrMaskFocalX + bleedDisplacementX;
-		FocalY = currItem->GrMaskFocalY + bleedDisplacementY;
+		StartX = currItem->GrMaskStartX;
+		StartY = currItem->GrMaskStartY;
+		EndX = currItem->GrMaskEndX;
+		EndY = currItem->GrMaskEndY;
+		FocalX = currItem->GrMaskFocalX;
+		FocalY = currItem->GrMaskFocalY;
 		Gscale = currItem->GrMaskScale;
 		Gskew = currItem->GrMaskSkew;
 		if (!(currItem->gradientMask().isEmpty()) && (doc.docGradients.contains(currItem->gradientMask())))
@@ -6169,6 +6169,8 @@
 			mpa.translate(0, currItem->height() * scaleY);
 			mpa.scale(scaleX, scaleY);
 		}
+		else
+			mpa.translate(bleedDisplacementX, bleedDisplacementY);
 		// #11761 : cause trouble when exporting transparency gradient
 		/*else
 			mpa.rotate(-currItem->rotation());*/
@@ -8147,12 +8149,12 @@
 	if (stroke)
 	{
 		GType = currItem->GrTypeStroke;
-		StartX = currItem->GrStrokeStartX + bleedDisplacementX;
-		StartY = currItem->GrStrokeStartY + bleedDisplacementY;
-		EndX = currItem->GrStrokeEndX + bleedDisplacementX;
-		EndY = currItem->GrStrokeEndY + bleedDisplacementY;
-		FocalX = currItem->GrStrokeFocalX + bleedDisplacementX;
-		FocalY = currItem->GrStrokeFocalY + bleedDisplacementY;
+		StartX = currItem->GrStrokeStartX;
+		StartY = currItem->GrStrokeStartY;
+		EndX = currItem->GrStrokeEndX;
+		EndY = currItem->GrStrokeEndY;
+		FocalX = currItem->GrStrokeFocalX;
+		FocalY = currItem->GrStrokeFocalY;
 		Gscale = currItem->GrStrokeScale;
 		Gskew = currItem->GrStrokeSkew;
 		if (!(currItem->strokeGradient().isEmpty()) && (doc.docGradients.contains(currItem->strokeGradient())))
@@ -8172,12 +8174,12 @@
 			return PDF_MeshGradientFill(output, currItem);
 		else if (GType == 12)
 			return PDF_PatchMeshGradientFill(output, currItem);
-		StartX = currItem->GrStartX + bleedDisplacementX;
-		StartY = currItem->GrStartY + bleedDisplacementY;
-		EndX = currItem->GrEndX + bleedDisplacementX;
-		EndY = currItem->GrEndY + bleedDisplacementY;
-		FocalX = currItem->GrFocalX + bleedDisplacementX;
-		FocalY = currItem->GrFocalY + bleedDisplacementY;
+		StartX = currItem->GrStartX;
+		StartY = currItem->GrStartY;
+		EndX = currItem->GrEndX;
+		EndY = currItem->GrEndY;
+		FocalX = currItem->GrFocalX;
+		FocalY = currItem->GrFocalY;
 		Gscale = currItem->GrScale;
 		Gskew = currItem->GrSkew;
 		if (!(currItem->gradient().isEmpty()) && (doc.docGradients.contains(currItem->gradient())))
@@ -8203,6 +8205,7 @@
 		}
 		else
 		{
+			mpa.translate(bleedDisplacementX, bleedDisplacementY);
 			mpa.translate(currItem->xPos() - ActPageP->xOffset(), ActPageP->height() - (currItem->yPos() - ActPageP->yOffset()));
 			mpa.rotate(-currItem->rotation());
 		}




More information about the scribus-commit mailing list