[gs-cvs] rev 7842 - trunk/gs/lib
tim at ghostscript.com
tim at ghostscript.com
Wed Apr 11 08:25:53 PDT 2007
Author: tim
Date: 2007-04-11 08:25:52 -0700 (Wed, 11 Apr 2007)
New Revision: 7842
Modified:
trunk/gs/lib/pdf_draw.ps
trunk/gs/lib/pdf_main.ps
trunk/gs/lib/pdf_ops.ps
trunk/gs/lib/pdfopt.ps
Log:
svn newbie mistake. Did not mean to grab the lib folder items.*
Modified: trunk/gs/lib/pdf_draw.ps
===================================================================
--- trunk/gs/lib/pdf_draw.ps 2007-04-11 15:20:44 UTC (rev 7841)
+++ trunk/gs/lib/pdf_draw.ps 2007-04-11 15:25:52 UTC (rev 7842)
@@ -376,11 +376,6 @@
/gssmask {
dup /None eq PDFusingtransparency not or {
-
- %TSOMARK
- % (gssmask endtransparencygroup) == flush
- % .endtransparencygroup
-
pop null
} {
% Preprocess the SMask value into a parameter dictionary for
@@ -400,7 +395,7 @@
} if
dup /TR knownoget {
resolveidfnproc /TransferFunction exch 3 2 roll
- } if
+ } if
dup /G oget dup /BBox oget /BBox exch 4 2 roll
/.execmaskgroup cvx 2 packedarray cvx /Draw exch 3 2 roll
pop .dicttomark
@@ -411,56 +406,23 @@
/.execmaskgroup { % <masknum> <paramdict> <formdict> .execmaskgroup -
% Save our place in PDFfile, and do a gsave to avoid resetting
% the color space.
-
-(in execmaskgroup ) == flush
-
currentcolorspace 4 1 roll
PDFfile fileposition 4 1 roll
% We have to select the group's color space so that the
% background color will be interpreted correctly.
-
-%TSOMARK
- dup /Group oget dup /foobar exch def /CS knownoget { csresolve dup setgcolorspace csput } if
- exch dup /BBox get dup
-
- %stack ( A ) == flush
-
- foobar exch
-
- userdict /begantransparencygroup known
- {
- (begantransparencygroup known) == flush
- pop pop
- }
- {
- (begantransparencygroup NOT known) == flush
- .beginformgroup
- } ifelse
-
- %stack ( B ) == flush
- %stack ( C ) == flush
- aload pop
- %stack ( D ) == flush
-
- .begintransparencymaskgroup
- {
+ dup /Group oget /CS knownoget { csresolve dup setgcolorspace csput } if
+ exch dup /BBox get aload pop .begintransparencymaskgroup {
dup /Resources knownoget { oforce } { 0 dict } ifelse
exch false resolvestream
.execgroup .endtransparencymask
- } stopped
- {
+ } stopped {
.discardtransparencymask stop
} if
-
-
PDFfile exch setfileposition
setcolorspace
} bdef
% Paint a Form+Group XObject, either for a transparency mask or for a Do.
/.execgroup { % <resdict> <stream> .execgroup -
-
-(In execgroup ) == flush
-
gsave //nodict begin
null SMask
1 .setopacityalpha 1 .setshapealpha
@@ -479,18 +441,12 @@
pop .dicttomark
% Stack: bbox paramdict
exch aload pop
-
- userdict /begantransparencygroup true put
-
.begintransparencygroup
} bdef
% .paintgroupform implements the Form PaintProc in the case where the
% Form XObject dictionary includes a Group key. See .paintform below.
/.paintgroupform { % <resdict> <stream> <formdict> .paintgroupform -
-
-(In paintgroupform ) == flush
-
dup /Group oget exch /BBox oget
% Stack: resdict stream groupdict bbox
.beginformgroup {
@@ -1024,9 +980,6 @@
PDFfile fileposition exch
gsave //nodict begin
null /SoftMask gput
-
-(In doimagesmask ) == flush
-
1 .setopacityalpha 1 .setshapealpha
0 .inittransparencymask 1 .inittransparencymask
/Compatible .setblendmode
@@ -1037,14 +990,8 @@
<< /Subtype /Group /Isolated true
/.image_with_SMask true % pdfwrite needs : see gs/src/ztrans.c, gs/src/gdevpdft.c
>> 0 0 1 1 .begintransparencygroup
-
- userdict /begantransparencygroup true put
-
doimage
.endtransparencygroup
-
- userdict /begantransparencygroup false put
-
} {
doimage
} ifelse
Modified: trunk/gs/lib/pdf_main.ps
===================================================================
--- trunk/gs/lib/pdf_main.ps 2007-04-11 15:20:44 UTC (rev 7841)
+++ trunk/gs/lib/pdf_main.ps 2007-04-11 15:25:52 UTC (rev 7842)
@@ -76,7 +76,7 @@
} loop
exch pop
{
- dup 127 string .peekstring { % "128 string" doesn't work for "(%stdin) run"
+ dup 1023 string .peekstring { % "1024 string" exceeds current %stdin buffer"
(%PDF-1.) search {
3 1 roll pop pop
dup (%!PS) search not {
Modified: trunk/gs/lib/pdf_ops.ps
===================================================================
--- trunk/gs/lib/pdf_ops.ps 2007-04-11 15:20:44 UTC (rev 7841)
+++ trunk/gs/lib/pdf_ops.ps 2007-04-11 15:25:52 UTC (rev 7842)
@@ -257,34 +257,11 @@
% Establish a given color (and color space) as current.
/.settransparencyparams { % <alpha> <smask> .settransparencyparams -
PDFusingtransparency {
-
-%dup type == flush
-%(In settransparencyparams ) == flush
-
/.inittransparencymask where {
pop AlphaIsShape {
- %(In settransparencyparams AlphaIsShape ) == flush
- 1 .setopacityalpha
-
- %true
- userdict /InitedTheMask known not
- {
- 0 .inittransparencymask
- } if
-
- exch .setshapealpha 1
+ 1 .setopacityalpha 0 .inittransparencymask exch .setshapealpha 1
} {
- %-->(In settransparencyparams AlphaIs NOT Shape) == flush
- 1 .setshapealpha
-
- %true
- userdict /InitedTheMask known not
- {
- 1 .inittransparencymask
- } if
-
-
- exch .setopacityalpha 0
+ 1 .setshapealpha 1 .inittransparencymask exch .setopacityalpha 0
} ifelse
% Set the soft mask by rendering the XObject. Doing this every time
% is obviously very inefficient; we'll improve it later.
@@ -299,22 +276,7 @@
/.settransparencymask { % <paramdict> <masknum> .settransparencymask -
exch dup null eq {
PDFusingtransparency {
-
-%(In settransparencymask ) == flush
-
- pop
-
- %true
- userdict /InitedTheMask known not
- {
- .inittransparencymask
- }
- {
- pop
- } ifelse
-
- userdict /InitedTheMask true put
-
+ pop .inittransparencymask
} {
dup /Draw get exec
} ifelse
@@ -325,9 +287,6 @@
% (Non-mask) images must execute setfillblend.
/setfillblend {
FillOverprint setoverprint
-
-%(In setfillblend ) == flush
-
FillConstantAlpha SoftMask .settransparencyparams
} def
/setfillstate {
@@ -335,9 +294,6 @@
} def
/setstrokestate {
StrokeColor StrokeColorSpace setgcolor StrokeOverprint setoverprint
-
-%(In setstrokestate ) == flush
-
StrokeConstantAlpha SoftMask .settransparencyparams
} def
/Cdict 15 dict dup begin % <color...> <colorspace> -proc- -
Modified: trunk/gs/lib/pdfopt.ps
===================================================================
--- trunk/gs/lib/pdfopt.ps 2007-04-11 15:20:44 UTC (rev 7841)
+++ trunk/gs/lib/pdfopt.ps 2007-04-11 15:25:52 UTC (rev 7842)
@@ -474,7 +474,7 @@
} forall
} if
% Visit the Contents stream(s).
- dup /Contents .knownget { (Visiting Contents) == flush omvisit } if
+ dup /Contents .knownget { omvisit } if
% Visit Image XObjects. We don't try to visit them in
% reference order.
filter_params { omvisit } daforall
@@ -791,9 +791,6 @@
% Find the Contents of a page.
/contentsobjects { % <pagedict> contentsobjects <firstobj#> <lastobj#> true
% <pagedict> contentsobjects false
-
- (Looking at contents) == flush
-
/Contents .knownget {
dup oforce % ref []
dup type /dicttype eq {
More information about the gs-cvs
mailing list