com.aspose.pdf.elements
Class GrayColorSpace

java.lang.Object
  extended bycom.aspose.pdf.elements.Color
      extended bycom.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.
 
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()
           
 void setGrayValue(short grayValue)
          Sets a value(0-255) that indicates the gray scale.
 
Methods inherited from class com.aspose.pdf.elements.Color
equals
 
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.

Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class Color
Throws:
java.lang.CloneNotSupportedException
See Also:
java.lang.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()
See Also:
com.aspose.pdf.elements.Color#getRGBComponentsAsString()