diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2016-07-04 09:28:06 +0100 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2017-05-29 17:48:52 +0100 |
commit | 7918a01dd37bc383e61ae0b237341e69286dc83c (patch) | |
tree | 8d2918a0c7bb87f5ba7291fd2d4a30f61830bdf3 /psi/ztype.c | |
parent | 2e2a9d851c73192739c9227ef0030f3ba3e7b6fd (diff) | |
download | ghostpdl-7918a01dd37bc383e61ae0b237341e69286dc83c.tar.gz |
PDF interpreter - Move ExtGState parameters into the regular graphics state
Bug #696511 - "Move ExtGState parameters into the regular graphics state"
A long time ago a decision was made not to replicate the PDF ExtGstate
parameters in the graphics state. This has had long term painful consequences
because we were unable to do a gsave/grestore to simply preserve
parameters but had to jump throuhg a lot of hoops. Amongst other problems
has been confusion over when exactly a change in colour has taken place.
With this commit the ExtGState parameters are moved into the graphics state
and obey gsave and grestore.
This extensive commit was worked on in the PDF_gstate branch and the history
is preserved in that branch.
This does introduce a few differences in the test suite;
There are a few cases where broken files (recursive SMasks) now render
slightly differently.
Some files now exhibit progressions, especially with CMYK or DeviceN output
devices, this is because the 'default' colour space was incorrect, the code
was using DeviceGray instead of the device's colour space, and this makes
a difference for some types of transparency blending when the Group does
not specify a Blending space.
A few other files demonstrate progressions because a change in colour now
takes place before an error occurs.
Diffstat (limited to 'psi/ztype.c')
-rw-r--r-- | psi/ztype.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/psi/ztype.c b/psi/ztype.c index 6a646322d..a945c2de1 100644 --- a/psi/ztype.c +++ b/psi/ztype.c @@ -76,6 +76,7 @@ ztype(i_ctx_t *i_ctx_p) /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { /* Get the type name from the structure. */ + if (op[-1].value.pstruct != 0x00) { const char *sname = gs_struct_type_name_string(gs_object_type(imemory, op[-1].value.pstruct)); @@ -84,6 +85,8 @@ ztype(i_ctx_t *i_ctx_p) if (code < 0) return code; + } else + return_error(gs_error_stackunderflow); } r_set_attrs(op - 1, a_executable); } else { |