com.aspose.pdf.elements
Class Color

java.lang.Object
  extended by com.aspose.pdf.elements.Color
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
CmykColorSpace, GrayColorSpace, RgbColorSpace

public class Color
extends java.lang.Object
implements java.lang.Cloneable

Represents the colorspaces used in Aspose.Pdf including RgbColorSpace,GrayColorSpace and CmykColorSpace.


Field Summary
static Color Aqua
          The color aqua.
static Color Black
          The color black.
static Color Blue
          The color blue.
static Color Fuchsia
          The color fuchsia.
static Color Gray
          The color gray.
static Color Green
          The color green.
static Color Lime
          The color lime.
static Color Maroon
          The color Maroon.
static Color Navy
          The color navy.
static Color Olive
          The color olive.
static Color Purple
          The color purple.
static Color Red
          The color rad.
static Color Silver
          The color silver.
static Color Teal
          The color teal.
static Color White
          The color white.
static Color Yellow
          The color yellow.
 
Constructor Summary
Color()
          Initializes a new instance of the Color class.
Color(byte r, byte g, byte b)
          Initializes a new instance of the class with RgbColorSpace.
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object arg0)
           
static Color getColor(java.lang.String colorName)
          Get pre-defined color as RgbColorSpace.
 short[] getRGBComponents()
          Gets a color represented in rgb color space.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Black

public static final Color Black
The color black.


Green

public static final Color Green
The color green.


Silver

public static final Color Silver
The color silver.


Lime

public static final Color Lime
The color lime.


Gray

public static final Color Gray
The color gray.


Olive

public static final Color Olive
The color olive.


White

public static final Color White
The color white.


Yellow

public static final Color Yellow
The color yellow.


Maroon

public static final Color Maroon
The color Maroon.


Navy

public static final Color Navy
The color navy.


Red

public static final Color Red
The color rad.


Blue

public static final Color Blue
The color blue.


Purple

public static final Color Purple
The color purple.


Teal

public static final Color Teal
The color teal.


Fuchsia

public static final Color Fuchsia
The color fuchsia.


Aqua

public static final Color Aqua
The color aqua.

Constructor Detail

Color

public Color()
Initializes a new instance of the Color class.


Color

public Color(byte r,
             byte g,
             byte b)
Initializes a new instance of the class with RgbColorSpace.

Parameters:
r - The red color value.
g - The green color value.
b - The blue color value.
Method Detail

getRGBComponents

public short[] getRGBComponents()
Gets a color represented in rgb color space.

Returns:
a float array that has red, green, blue members.

equals

public boolean equals(java.lang.Object arg0)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException
See Also:
Object.clone()

getColor

public static Color getColor(java.lang.String colorName)
Get pre-defined color as RgbColorSpace.

Parameters:
colorName -