r21833 by jghali - #14680: When an image object is mirrored horizontally, its shape gets double-reversed on PDF export

scribus-commit scribus-commit at lists.scribus.net
Thu Mar 16 22:48:18 UTC 2017


Author: jghali
Date: Thu Mar 16 22:48:18 2017
New Revision: 21833

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21833
Log:
#14680: When an image object is mirrored horizontally, its shape gets double-reversed on PDF export

Modified:
    trunk/Scribus/scribus/pdflib_core.cpp
    trunk/Scribus/scribus/pslib.cpp

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21833&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp	(original)
+++ trunk/Scribus/scribus/pdflib_core.cpp	Thu Mar 16 22:48:18 2017
@@ -2726,13 +2726,13 @@
 							}
 						}
 						PutPage("q\n");
+						PutPage(SetPathAndClip(ite, true));
 						if (ite->imageFlippedH())
 							PutPage("-1 0 0 1 "+FToStr(ite->width())+" 0 cm\n");
 						if (ite->imageFlippedV())
 							PutPage("1 0 0 -1 0 "+FToStr(-ite->height())+" cm\n");
 						if (ite->imageClip.size() != 0)
 							PutPage(SetImagePathAndClip(ite));
-						PutPage(SetPathAndClip(ite, true));
 						if ((ite->imageIsAvailable) && (!ite->Pfile.isEmpty()))
 						{
 							if (!PDF_Image(ite, ite->Pfile, ite->imageXScale(), ite->imageYScale(), ite->imageXOffset(), -ite->imageYOffset(), false, ite->IProfile, ite->UseEmbedded, ite->IRender, &tmpOut))
@@ -4429,13 +4429,13 @@
 				}
 			}
 			tmp += "q\n";
+			tmp += SetPathAndClip(ite, true);
 			if (ite->imageFlippedH())
 				tmp += "-1 0 0 1 "+FToStr(ite->width())+" 0 cm\n";
 			if (ite->imageFlippedV())
 				tmp += "1 0 0 -1 0 "+FToStr(-ite->height())+" cm\n";
 			if (ite->imageClip.size() != 0)
 				tmp += SetImagePathAndClip(ite);
-			tmp += SetPathAndClip(ite, true);
 			if ((ite->imageIsAvailable) && (!ite->Pfile.isEmpty()))
 			{
 				if (!PDF_Image(ite, ite->Pfile, ite->imageXScale(), ite->imageYScale(), ite->imageXOffset(), -ite->imageYOffset(), false, ite->IProfile, ite->UseEmbedded, ite->IRender, &tmpOut))

Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21833&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp	(original)
+++ trunk/Scribus/scribus/pslib.cpp	Thu Mar 16 22:48:18 2017
@@ -1828,6 +1828,7 @@
 				PS_newpath();
 			}
 			PS_save();
+			SetPathAndClip(c->PoLine, true);
 			if (c->imageFlippedH())
 			{
 				PS_translate(c->width(), 0);
@@ -1840,7 +1841,6 @@
 			}
 			if (c->imageClip.size() != 0)
 				SetPathAndClip(c->imageClip, true);
-			SetPathAndClip(c->PoLine, true);
 			if ((c->imageIsAvailable) && (!c->Pfile.isEmpty()))
 			{
 				bool imageOk = false;




More information about the scribus-commit mailing list