[gs-commits] rev 12302 - trunk/gs/Resource/Init
ray at ghostscript.com
ray at ghostscript.com
Sat Mar 19 00:32:38 UTC 2011
Author: ray
Date: 2011-03-19 00:32:37 +0000 (Sat, 19 Mar 2011)
New Revision: 12302
Modified:
trunk/gs/Resource/Init/pdf_ops.ps
Log:
Fix for some strange rendering with PDF 1.7 FTS files when we have shading and transparency
and are both filling and stroking text (Text Rendering modes 2 and 6). Customer 532.
EXPECTED DIFFERENCES:
PDF_1.7_FTS/fts_15_ group, 1509, 1511, 1513, 1515, 1517, 1519 and 1521.
Examined with bmpcmp and all seem to be progressions.
Modified: trunk/gs/Resource/Init/pdf_ops.ps
===================================================================
--- trunk/gs/Resource/Init/pdf_ops.ps 2011-03-18 05:16:08 UTC (rev 12301)
+++ trunk/gs/Resource/Init/pdf_ops.ps 2011-03-19 00:32:37 UTC (rev 12302)
@@ -985,7 +985,26 @@
currentpoint //Tmatrix currentmatrix TextSaveMatrix setmatrix .swapcolors stroke .swapcolors
setmatrix moveto
} bdef
-/tB { gsave tf grestore tS } bdef
+
+% Handle transparency the same as /B operator
+/tB {
+ PDFusingtransparency {
+ % knockout trans group around the filled and stroked object
+ mark
+ /Isolated //true /Knockout //true
+ .dicttomark
+ 1 .setopacityalpha
+ % While text will always have a currentpoint, strokepath seems to mess with it.
+ % we get the currentpoint, then use moveto to restore it for pathbbox
+ gsave currentpoint strokepath moveto pathbbox grestore
+ .begintransparencygroup
+ gsave tf grestore tS
+ .endtransparencygroup
+ } {
+ gsave tf grestore tS
+ } ifelse
+} bdef
+
% This does the wrong thing if there have been multiple text operations
% within a single BT/ET pair, but it's a start.
/tW { } bdef
More information about the gs-commits
mailing list