summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorL Peter Deutsch <lpd@ghostscript.com>2000-03-30 18:01:58 +0000
committerL Peter Deutsch <lpd@ghostscript.com>2000-03-30 18:01:58 +0000
commit3dbad4290e4158814a5230750adfd7c8c88d2334 (patch)
tree1226b849a6065d76e5738197131e66ea347eb5f2
parent5e124d49e2b24e90684f19e6478a353f15c95b0e (diff)
downloadghostpdl-3dbad4290e4158814a5230750adfd7c8c88d2334.tar.gz
Fix: Text with a Pattern color scaled the pattern according to the text
matrix, not the default matrix of the marking context. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@222 a1074d23-0009-0410-80fe-cf8c14f379e6
-rw-r--r--gs/lib/pdf_base.ps10
-rw-r--r--gs/lib/pdf_main.ps3
-rw-r--r--gs/lib/pdf_ops.ps3
3 files changed, 11 insertions, 5 deletions
diff --git a/gs/lib/pdf_base.ps b/gs/lib/pdf_base.ps
index 74ebb21ff..de903b843 100644
--- a/gs/lib/pdf_base.ps
+++ b/gs/lib/pdf_base.ps
@@ -139,10 +139,14 @@ pdfdict begin
} bind def
% Execute a file, like .pdfrun, for a marking context.
-% This temporarily rebinds LocalResources.
+% This temporarily rebinds LocalResources and DefaultMatrix.
/.pdfruncontext { % <resdict> <file> <opdict> .pdfruncontext -
- /.pdfrun load /LocalResources LocalResources /store load
- /LocalResources 8 -1 roll store 4 .execn
+ /.pdfrun load LocalResources DefaultMatrix
+ /LocalResources 7 -1 roll store
+ /DefaultMatrix matrix currentmatrix store
+ 3 .execn
+ /DefaultMatrix exch store
+ /LocalResources exch store
} bind def
% Get the depth of the PDF operand stack. The main program (pdf_main.ps)
diff --git a/gs/lib/pdf_main.ps b/gs/lib/pdf_main.ps
index 69f158441..00e76c40f 100644
--- a/gs/lib/pdf_main.ps
+++ b/gs/lib/pdf_main.ps
@@ -206,6 +206,7 @@ pdfdict begin
pdfdict readonly pop % can't do it any earlier than this
15 dict begin
/LocalResources 0 dict def
+ /DefaultMatrix null def % establish binding
/PSLevel1 where { pop } { /PSLevel1 false def } ifelse
cvlit /PDFfile exch def
/PDFsource PDFfile def
@@ -577,7 +578,7 @@ end readonly def
2 index /CropBox knownoget {
boxrect 4 array astore 1 index /ClipRect 3 -1 roll put
} if
- dictbeginpage setmatrix
+ dictbeginpage /DefaultMatrix 1 index store setmatrix
dup /Contents knownoget not { 0 array } if
dup type /arraytype ne { 1 array astore } if
count 1 sub /pdfemptycount exch store
diff --git a/gs/lib/pdf_ops.ps b/gs/lib/pdf_ops.ps
index 42ab75ab8..b3695165e 100644
--- a/gs/lib/pdf_ops.ps
+++ b/gs/lib/pdf_ops.ps
@@ -175,7 +175,8 @@ nodict readonly pop
/Indexed /CIEBasedA load def
/Pattern
{ dup currentcolorspace eq { pop } { setcolorspace } ifelse
- dup /Matrix .knownget not { matrix } if makepattern setcolor
+ dup /Matrix .knownget not { matrix } if
+ gsave DefaultMatrix setmatrix makepattern grestore setcolor
} bdef
end def
/setgcolor % (null | <color...>) <colorspace> setgcolor -