com.aspose.pdf.elements
Class CmykColorSpace

java.lang.Object
  extended bycom.aspose.pdf.elements.Color
      extended bycom.aspose.pdf.elements.CmykColorSpace
All Implemented Interfaces:
java.lang.Cloneable

public class CmykColorSpace
extends Color

Represents the CMYK 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
CmykColorSpace(short C, short M, short Y, short K)
          Initializes an object of CmykColorSpace.
 
Method Summary
 java.lang.Object clone()
           
 short getC()
          Gets a value (0-255) that indicates the cyan component of the CMYK colorspace.
 short getK()
          Gets a value (0-255) that indicates the black component of the CMYK colorspace.
 short getM()
          Gets a value (0-255) that indicates the magenta component of the CMYK colorspace.
 short[] getRGBComponents()
          Gets a color represented in rgb color space.
 java.lang.String getRGBComponentsAsString()
           
 short getY()
          Gets a value (0-255) that indicates the yellow component of the CMYK colorspace.
 void setC(short C)
          Sets a value (0-255) that indicates the cyan component of the CMYK colorspace.
 void setK(short K)
          Sets a value (0-255) that indicates the black component of the CMYK colorspace.
 void setM(short M)
          Sets a value (0-255) that indicates the magenta component of the CMYK colorspace.
 void setY(short Y)
          Sets a value (0-255) that indicates the yellow component of the CMYK colorspace.
 
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

CmykColorSpace

public CmykColorSpace(short C,
                      short M,
                      short Y,
                      short K)
Initializes an object of CmykColorSpace.

 [SampleCode]
 Segment seg3 = new Segment(text1,"This Text use cmyk colorspace. \n");
 seg3.getTextInfo().setTextColor(new CmykColorSpace((short)30,(short)40,(short)255,(short)0));
 text1.getSegments().add(seg3);
 

Method Detail

getC

public short getC()
Gets a value (0-255) that indicates the cyan component of the CMYK colorspace.


setC

public void setC(short C)
Sets a value (0-255) that indicates the cyan component of the CMYK colorspace.


getK

public short getK()
Gets a value (0-255) that indicates the black component of the CMYK colorspace.


setK

public void setK(short K)
Sets a value (0-255) that indicates the black component of the CMYK colorspace.


getM

public short getM()
Gets a value (0-255) that indicates the magenta component of the CMYK colorspace.


setM

public void setM(short M)
Sets a value (0-255) that indicates the magenta component of the CMYK colorspace.


getY

public short getY()
Gets a value (0-255) that indicates the yellow component of the CMYK colorspace.


setY

public void setY(short Y)
Sets a value (0-255) that indicates the yellow component of the CMYK colorspace.


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()

getRGBComponentsAsString

public java.lang.String getRGBComponentsAsString()
See Also:
com.aspose.pdf.elements.Color#getRGBComponentsAsString()