com.aspose.pdf.elements
Class GrayColorSpace

java.lang.Object
  extended by com.aspose.pdf.elements.Color
      extended by com.aspose.pdf.elements.GrayColorSpace
All Implemented Interfaces:
java.lang.Cloneable

public class GrayColorSpace
extends Color
implements java.lang.Cloneable

Encapsulates the Gray colorspace.


Field Summary
 
Fields inherited from class com.aspose.pdf.elements.Color
Aqua, Black, Blue, Fuchsia, Gray, Green, Lime, Maroon, Navy, Olive, Purple, Red, Silver, Teal, White, Yellow
 
Constructor Summary
GrayColorSpace(short grayValue)
          Initializes a new instance of the GrayColorSpace class.
GrayColorSpace(java.lang.String gray)
          Initializes a new instance of the GrayColorSpace class from a string.
 
Method Summary
 java.lang.Object clone()
           
 float getGrayValue()
          Gets a value(0-255) that indicates the gray scale.
 short[] getRGBComponents()
          Gets a color represented in rgb color space.
 java.lang.String getRGBComponentsAsString()
          Gets a color representation in rgb color space as String.
 void setGrayValue(short grayValue)
          Sets a value(0-255) that indicates the gray scale.
 
Methods inherited from class com.aspose.pdf.elements.Color
equals, getColor
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrayColorSpace

public GrayColorSpace(short grayValue)
Initializes a new instance of the GrayColorSpace class.


GrayColorSpace

public GrayColorSpace(java.lang.String gray)
Initializes a new instance of the GrayColorSpace class from a string.

Method Detail

clone

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

getRGBComponents

public short[] getRGBComponents()
Description copied from class: Color
Gets a color represented in rgb color space.

Overrides:
getRGBComponents in class Color
Returns:
a float array that has red, green, blue members.
See Also:
Color.getRGBComponents()

getGrayValue

public float getGrayValue()
Gets a value(0-255) that indicates the gray scale.

Returns:
Returns the gray value.

setGrayValue

public void setGrayValue(short grayValue)
Sets a value(0-255) that indicates the gray scale.

Parameters:
grayValue - The gray value to set.

getRGBComponentsAsString

public java.lang.String getRGBComponentsAsString()
Description copied from class: Color
Gets a color representation in rgb color space as String.

See Also:
Color.getRGBComponentsAsString()