r16642 by jghali - #10034: "fill rule" setting not correctly exported to PS/PDF

scribus-commit scribus-commit at lists.scribus.net
Wed Jun 8 19:40:53 UTC 2011


Author: jghali
Date: Wed Jun  8 19:40:53 2011
New Revision: 16642

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16642
Log:
#10034: "fill rule" setting not correctly exported to PS/PDF

Modified:
    branches/Version135/Scribus/scribus/pdflib_core.cpp
    branches/Version135/Scribus/scribus/pslib.cpp

Modified: branches/Version135/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16642&path=/branches/Version135/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/pdflib_core.cpp (original)
+++ branches/Version135/Scribus/scribus/pdflib_core.cpp Wed Jun  8 19:40:53 2011
@@ -1911,7 +1911,7 @@
 							else
 							{
 								PutPage(SetClipPath(ite));
-								PutPage("h\nf*\n");
+								PutPage(ite->fillRule ? "h\nf*\n" : "h\nf\n");
 							}
 						}
 						PutPage("q\n");
@@ -2005,13 +2005,15 @@
 							if (!PDF_Gradient(tmpOut, ite))
 								return false;
 							PutPage(tmpOut);
+							PutPage(SetClipPath(ite));
+							PutPage(ite->fillRule ? "h\nf*\n" : "h\nf\n");
 						}
 						else
 						{
 							if (ite->fillColor() != CommonStrings::None)
 							{
 								PutPage(SetClipPath(ite));
-								PutPage("h\nf*\n");
+								PutPage(ite->fillRule ? "h\nf*\n" : "h\nf\n");
 							}
 						}
 						if ((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty()))
@@ -2048,13 +2050,15 @@
 								if (!PDF_Gradient(tmpOut, ite))
 									return false;
 								PutPage(tmpOut);
+								PutPage(SetClipPath(ite));
+								PutPage(ite->fillRule ? "h\nf*\n" : "h\nf\n");
 							}
 							else
 							{
 								if (ite->fillColor() != CommonStrings::None)
 								{
 									PutPage(SetClipPath(ite));
-									PutPage("h\nf*\n");
+									PutPage(ite->fillRule ? "h\nf*\n" : "h\nf\n");
 								}
 							}
 						}
@@ -3465,10 +3469,7 @@
 				if (ite->fillColor() != CommonStrings::None)
 				{
 					tmp += SetClipPath(ite);
-					if (ite->fillRule)
-						tmp += "h\nf*\n";
-					else
-						tmp += "h\nf\n";
+					tmp += (ite->fillRule ? "h\nf*\n" : "h\nf\n");
 				}
 			}
 			if ((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty()))
@@ -5263,10 +5264,7 @@
 		QString tmp = "/Pattern cs\n";
 		tmp += "/Pattern"+QString::number(patObject)+" scn\n";
 		tmp += SetClipPath(currItem);
-		if (currItem->fillRule)
-			tmp += "h\nf*\n";
-		else
-			tmp += "h\nf\n";
+		tmp += (currItem->fillRule ? "h\nf*\n" : "h\nf\n");
 		ResCount++;
 		output = tmp;
 		return true;

Modified: branches/Version135/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16642&path=/branches/Version135/Scribus/scribus/pslib.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/pslib.cpp (original)
+++ branches/Version135/Scribus/scribus/pslib.cpp Wed Jun  8 19:40:53 2011
@@ -2556,6 +2556,7 @@
 			{
 				SetClipPath(&c->PoLine);
 				PS_closepath();
+				fillRule = c->fillRule;
 				if (c->GrType != 0)
 					HandleGradient(c, c->width(), c->height(), gcr);
 				else




More information about the scribus-commit mailing list