aspose.pdf
Class CmykColorSpace

java.lang.Object
  extended by aspose.pdf.CmykColorSpace

public class CmykColorSpace
extends java.lang.Object

Represents the CMYK colorspace.

Remarks: Note that you can use the constructor to create a color object with CMYK colorspace and need not use this class directly.

Typical usages are the following:

[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); Graph graph1 = new Graph(sec1,200,400); sec1.getParagraphs().add(graph1); float[] posArr = new float[]{100,0,300,0}; Line l1 = new Line(graph1,posArr); l1.getGraphInfo().setColor(new aspose.pdf.Color("Red")); graph1.getShapes().add(l1); posArr = new float[]{100,50,300,50}; Line l2 = new Line(graph1,posArr); l2.getGraphInfo().setColor(new aspose.pdf.Color((short)0,(short)128,(short)128)); graph1.getShapes().add(l2); posArr = new float[]{100,100,300,100}; Line l3 = new Line(graph1,posArr); l3.getGraphInfo().setColor(new aspose.pdf.Color((short)0,(short)128,(short)64,(short)0)); graph1.getShapes().add(l3); posArr = new float[]{100,150,300,150}; Line l4 = new Line(graph1,posArr); l4.getGraphInfo().setColor(new aspose.pdf.Color((short)140)); graph1.getShapes().add(l4); pdf1.save(...); [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section> <Graph Height="200" Width="400"> <Line Color="Red" Position="100 0 300 0" /> <Line Color="rgb 0 128 128" Position="100 50 300 50" /> <Line Color="cmyk 0 128 64 0" Position="100 100 300 100" /> <Line Color="gray 140" Position="100 150 300 150" /> </Graph> </Section> </Pdf>


Constructor Summary
CmykColorSpace()
          Constructor - initializes a new instance of the CmykColorSpace class.
 
Method Summary
 short getC()
          Gets a byte value (0-255) that indicates the cyan component of the CMYK colorspace.
 short getK()
          Gets a byte value (0-255) that indicates the black component of the CMYK colorspace.
 short getM()
          a short value (0-255) that indicates the magenta component of the CMYK colorspace.
 short getY()
          Gets a short value (0-255) that indicates the yellow component of the CMYK colorspace.
 void setC(short value)
          Sets a short value (0-255) that indicates the cyan component of the CMYK colorspace.
 void setK(short value)
          Sets a short value (0-255) that indicates the yellow component of the CMYK colorspace.
 void setM(short value)
          Sets a short value (0-255) that indicates the magenta component of the CMYK colorspace.
 void setY(short value)
          Sets a short value (0-255) that indicates the yellow component of the CMYK colorspace.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmykColorSpace

public CmykColorSpace()
Constructor - initializes a new instance of the CmykColorSpace class.

Method Detail

getC

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

Returns:
A short value.

setC

public void setC(short value)
Sets a short value (0-255) that indicates the cyan component of the CMYK colorspace. if the value greater than 255, use 255 instead, if the value less than 0, use (value + 256) instead.

Parameters:
value - A short value.

getM

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

Returns:
A short value.

setM

public void setM(short value)
Sets a short value (0-255) that indicates the magenta component of the CMYK colorspace. if the value greater than 255, use 255 instead, if the value less than 0, use (value + 256) instead.

Parameters:
value - A short value.

getY

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

Returns:
A short value.

setY

public void setY(short value)
Sets a short value (0-255) that indicates the yellow component of the CMYK colorspace. if the value greater than 255, use 255 instead, if the value less than 0, use (value + 256) instead.

Parameters:
value - A short value.

getK

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

Returns:
A short value.

setK

public void setK(short value)
Sets a short value (0-255) that indicates the yellow component of the CMYK colorspace. if the value greater than 255, use 255 instead, if the value less than 0, use (value + 256) instead.

Parameters:
value - A short value.