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

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


Author: jghali
Date: Wed Jun  8 19:41:40 2011
New Revision: 16643

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

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=16643&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Wed Jun  8 19:41:40 2011
@@ -2038,10 +2038,7 @@
 								PutPage(tmpOut);
 							}
 							PutPage(SetClipPath(ite));
-							if (ite->fillRule)
-								PutPage("h\nf*\n");
-							else
-								PutPage("h\nf\n");
+							PutPage(ite->fillRule ? "h\nf*\n" : "h\nf\n");
 						}
 						PutPage("q\n");
 						if (ite->imageClip.size() != 0)
@@ -2212,20 +2209,14 @@
 							}
 							PutPage(tmpOut);
 							PutPage(SetClipPath(ite));
-							if (ite->fillRule)
-								PutPage("h\nf*\n");
-							else
-								PutPage("h\nf\n");
+							PutPage(ite->fillRule ? "h\nf*\n" : "h\nf\n");
 						}
 						else
 						{
 							if (ite->fillColor() != CommonStrings::None)
 							{
 								PutPage(SetClipPath(ite));
-								if (ite->fillRule)
-									PutPage("h\nf*\n");
-								else
-									PutPage("h\nf\n");
+								PutPage(ite->fillRule ? "h\nf*\n" : "h\nf\n");
 							}
 						}
 						PutPage("Q\n");
@@ -2304,20 +2295,14 @@
 								}
 								PutPage(tmpOut);
 								PutPage(SetClipPath(ite));
-								if (ite->fillRule)
-									PutPage("h\nf*\n");
-								else
-									PutPage("h\nf\n");
+								PutPage(ite->fillRule ? "h\nf*\n" : "h\nf\n");
 							}
 							else
 							{
 								if (ite->fillColor() != CommonStrings::None)
 								{
 									PutPage(SetClipPath(ite));
-									if (ite->fillRule)
-										PutPage("h\nf*\n");
-									else
-										PutPage("h\nf\n");
+									PutPage(ite->fillRule ? "h\nf*\n" : "h\nf\n");
 								}
 							}
 							PutPage("Q\n");
@@ -3706,18 +3691,12 @@
 					}
 					tmp += tmpOut;
 					tmp += SetClipPath(ite);
-					if (ite->fillRule)
-						tmp += "h\nf*\n";
-					else
-						tmp += "h\nf\n";
+					tmp += (ite->fillRule ? "h\nf*\n" : "h\nf\n");
 				}
 				else
 				{
 					tmp += SetClipPath(ite);
-					if (ite->fillRule)
-						tmp += "h\nf*\n";
-					else
-						tmp += "h\nf\n";
+					tmp += (ite->fillRule ? "h\nf*\n" : "h\nf\n");
 				}
 			}
 			tmp += "q\n";
@@ -3821,18 +3800,12 @@
 					}
 					tmp += tmpOut;
 					tmp += SetClipPath(ite);
-					if (ite->fillRule)
-						tmp += "h\nf*\n";
-					else
-						tmp += "h\nf\n";
+					tmp += (ite->fillRule ? "h\nf*\n" : "h\nf\n");
 				}
 				else
 				{
 					tmp += SetClipPath(ite);
-					if (ite->fillRule)
-						tmp += "h\nf*\n";
-					else
-						tmp += "h\nf\n";
+					tmp += (ite->fillRule ? "h\nf*\n" : "h\nf\n");
 				}
 			}
 			tmp += "q\n";
@@ -3991,20 +3964,14 @@
 				}
 				tmp += tmpOut;
 				tmp += SetClipPath(ite);
-				if (ite->fillRule)
-					tmp += "h\nf*\n";
-				else
-					tmp += "h\nf\n";
+				tmp += (ite->fillRule ? "h\nf*\n" : "h\nf\n");
 			}
 			else
 			{
 				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");
 				}
 			}
 			tmp += "Q\n";
@@ -4084,20 +4051,14 @@
 					}
 					tmp += tmpOut;
 					tmp += SetClipPath(ite);
-					if (ite->fillRule)
-						tmp += "h\nf*\n";
-					else
-						tmp += "h\nf\n";
+					tmp += (ite->fillRule ? "h\nf*\n" : "h\nf\n");
 				}
 				else
 				{
 					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");
 					}
 				}
 				tmp += "Q\n";

Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16643&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp (original)
+++ trunk/Scribus/scribus/pslib.cpp Wed Jun  8 19:41:40 2011
@@ -2067,6 +2067,7 @@
 			{
 				SetClipPath(&c->PoLine);
 				PS_closepath();
+				fillRule = c->fillRule;
 				if (c->GrType != 0)
 					HandleGradientFillStroke(c, gcr, false);
 				else




More information about the scribus-commit mailing list