| setcmykcolor |
(Number cyan, Number magenta, Number yellow [, Number black]) |
typedict.Graphics |
| setcmykcolor |
(Number cyan, Number magenta, Number yellow, Number black, int ps) |
|
| |
Sets
foreground
to the color that represents the
cyan,
magenta,
and
yellow
arguments, each of which should be a number between
0.0
and
1.0.
Colors specified this way represent a subtractive color model
where a value of
1.0
means no contribution from the corresponding additive component,
and a value of
0.0
means a full contribution from that component.
The optional
black
argument, when supplied, is added to the other three components
before they are actually forced into the required range.
When non-zero, the
ps
argument indicates that the Adobe CMYK-to-RGB conversion formula found in the
PostScript Language Reference Manual should be used (the default).
That formula expressed in the Java language is:
rgb_color = new Color(
(float)(1.0 - Math.min(1.0, cyan + black)),
(float)(1.0 - Math.min(1.0, magenta + black)),
(float)(1.0 - Math.min(1.0, yellow + black))
);
A zero for the
ps
argument triggers use of the CMYK-to-RGB conversion formula found either at
wikipedia.org or in the comp.graphics newsgroup FAQ.
That formula expressed in the Java language is:
rgb_color = new Color(
(float)(1.0 - Math.min(1.0, cyan*(1.0 - black) + black)),
(float)(1.0 - Math.min(1.0, magenta*(1.0 - black) + black)),
(float)(1.0 - Math.min(1.0, yellow*(1.0 - black) + black))
);
| |
| Return: |
none
| | |
| See Also: |
grestore,
grestoreall,
gsave,
initclip,
initgraphics,
setdash,
setfont,
setgradient,
setgray,
sethsbcolor,
setlinecap,
setlinejoin,
setlinewidth,
setmiterlimit,
setpath,
setrgbcolor,
settexture
|
|
Yoix is a registered trademark of AT&T Inc.
|