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