|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.paulhertz.aifile.CMYKColor
public class CMYKColor
Provides storage and conversion utilities for CMYK colors.
Constructor Summary | |
---|---|
CMYKColor()
Instantiates a CMYK color with all components set to 0 (i.e., white) |
|
CMYKColor(double[] cmyk)
Instantiates a CMYK color |
|
CMYKColor(double c,
double m,
double y,
double k)
Instantiates a CMYK color from c, m, y and k components represented as doubles in the range 0..1 |
Method Summary | |
---|---|
double |
c()
|
double |
k()
|
double |
m()
|
static CMYKColor |
rgb2cmyk(double[] rgb)
Uses the standard quick and dirty direct transform of RGB to CMYK. |
static CMYKColor |
rgb2cmyk(double red,
double green,
double blue)
Uses the standard quick and dirty direct transform of RGB to CMYK. |
static CMYKColor |
rgb2cmyk(int[] rgb)
Uses the standard quick and dirty direct transform of RGB to CMYK. |
static CMYKColor |
rgb2cmyk(RGBColor rgb)
Uses the standard quick and dirty direct transform of RGB to CMYK. |
void |
setC(double c)
|
void |
setK(double k)
|
void |
setM(double m)
|
void |
setY(double y)
|
double |
y()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CMYKColor(double c, double m, double y, double k)
c
- m
- y
- k
- public CMYKColor(double[] cmyk)
cmyk
- an array of four doubles in the range 0..1 representing c, m, y and k componentspublic CMYKColor()
Method Detail |
---|
public double c()
public void setC(double c)
c
- the cyan component (0..1) to setpublic double m()
public void setM(double m)
m
- the magenta componet (0..1) to setpublic double y()
public void setY(double y)
y
- the yellow component (0..1) to setpublic double k()
public void setK(double k)
k
- the black component (0..1) to setpublic static CMYKColor rgb2cmyk(double red, double green, double blue)
red
- the red component, in the range 0..1green
- the green component, in the range 0..1blue
- the blue component, in the range 0..1
public static CMYKColor rgb2cmyk(int[] rgb)
rgb
- an RGB color represented as an array of ints in the range 0..255
public static CMYKColor rgb2cmyk(double[] rgb)
rgb
- an RGB color represented as an array of doubles in the range 0..1
public static CMYKColor rgb2cmyk(RGBColor rgb)
rgb
- an RGB color
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |