[dvipdfmx] improving color stack in xdvipdfmx
Ulrike Fischer
news3 at nililand.de
Wed Jun 24 19:22:34 CEST 2020
Hello Shunsaku
> I'm currently working on extending dvipdfmx to support various color
> models. (mostly finished but testing remains)
> This is implemented just as an extension to the existing color special
> of dvipdfmx, pdf:bcolor and pdf:ecolor, of the form:
> \special{pdf:bcolor @colorspace [1.0 0.4 0]}
> ...
> \special{pdf:ecolor}
> where @colorspace is an object representing color space defined
> somewhere before. (/DeviceCMYK and other device color model
> names can also be used in place of object reference)
So to use device color one would use
\special{pdf:bcolor [1.0 0.4 0]} (as before)
or
\special{pdf:bcolor /DeviceRGB [1.0 0.4 0]}
and for some other colorspace
\special{pdf:bcolor @colorspace [ values for this colorspace]}
?
This sounds good.
What is with the resource management? I guess the packages will have
to add the /ColorSpace to the page resources?
But then how do can one get the key of the color?
E.g. how to I access /nameA and nameB here:
\special{pdf:obj @colorspace_srgbA [ /ICCBased @iccpA ]}
\special{pdf:obj @colorspace_srgbB [ /ICCBased @iccpB ]}
\special{pdf:obj @colorspaces <</nameA @colorspace_srgbA /nameB @colorspace_srgbB>>}
\special{pdf:put @resources <</ColorSpace @colorspaces >>}
Or if xdvipdfmx wants to do the management, how can then be avoided
that it clashes with other additions? E.g. tikz is adding this:
<</pgfprgb[/Pattern/DeviceRGB]>>
--
Mit freundlichen Grüßen
Ulrike Fischer
More information about the dvipdfmx
mailing list.