diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2018-02-12 15:20:23 +0000 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2018-02-12 15:20:23 +0000 |
commit | edf3684305414731fbdb9b90de7dbcbab0dace5f (patch) | |
tree | 6b7bd54e7a3ce2ea17c8de7b8117da7e37a324f2 | |
parent | b7a0556297296d8355748b9b130de02923a1c4cd (diff) | |
download | ghostpdl-edf3684305414731fbdb9b90de7dbcbab0dace5f.tar.gz |
Fix comments
The comments in zinitgrpahics and the PostScript definition of
initgraphics in gs_cspace.ps were incorrect, now that gs_initgraphics
does reset the colour space properly.
However, we do still need the /initgraphics override in gs_cspace.ps
in order to correctly set the colour space which we store in the
'interpreter' graphics state. We only use that to hand back in response
to a currentcolorspace, but we do need it.
-rw-r--r-- | Resource/Init/gs_cspace.ps | 6 | ||||
-rw-r--r-- | psi/zgstate.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/Resource/Init/gs_cspace.ps b/Resource/Init/gs_cspace.ps index 35e4da182..c612ea9ac 100644 --- a/Resource/Init/gs_cspace.ps +++ b/Resource/Init/gs_cspace.ps @@ -64,8 +64,10 @@ end % colorspacedict % % - initgraphics - % -% The internal routine gs_initgraphics doesn't (re)set the color space, -% so we must redefine the operation to do it here. +% Although the internal routine gs_initgraphics resets the color space, +% it does not reset the color space we store in the 'interpreter' +% graphics state (so that we can hand it back in currentcolorspace). +% So we need to do that in the PostScript world. % % /initgraphics diff --git a/psi/zgstate.c b/psi/zgstate.c index 254335c0e..b7ee61c43 100644 --- a/psi/zgstate.c +++ b/psi/zgstate.c @@ -188,8 +188,10 @@ static int zinitgraphics(i_ctx_t *i_ctx_p) { /* - * gs_initigraphics does not reset the colorspace; - * this is now handled in the PostScript code. + * Although gs_initgraphics resets the color space to DeviceGray, it does + * not modify the 'interpreter' gstate, which stores a copy of the PostScript + * object used to set the colour space. We could do this here, with effort, + * but instead we choose t do it in gs_cspace.ps and handle it all in PostScript. */ make_empty_array(&istate->dash_pattern_array, a_all); return gs_initgraphics(igs); |