SetColor
Inheritance: java.lang.Object, com.aspose.pdf.Operator, com.aspose.pdf.operators.SetColorOperator, com.aspose.pdf.operators.BasicSetColorOperator
public class SetColor extends BasicSetColorOperator
Represents class for sc operator (set color for non-stroking operations).
Constructors
Constructor | Description |
---|---|
SetColor() | Initializes operator. |
SetColor(int index, ICommand command) | Constructor for operator class. |
SetColor(double g) | Set color for stroking operators for DeviceGray, CalGray and Indexed color spaces. |
SetColor(double r, double g, double b) | Set color for stroking operator for DeviceRGB, CalRGB, and Lab color spaces |
SetColor(double c, double m, double y, double k) | Set color for non-stroking operator for CMYK color space |
SetColor(double[] color) | Constructor which allows to specify color components. |
Methods
Method | Description |
---|---|
getColor() | Not supported yet. |
getC() | Gets or sets the cyan component. |
setC(double value) | Gets or sets the cyan component. |
getM() | Gets or sets the magenta component. |
setM(double value) | Gets or sets the magenta component. |
getY() | Gets or sets the yellow component. |
setY(double value) | Gets or sets the yellow component. |
getK() | Gets or sets the black component. |
setK(double value) | Gets or sets the black component. |
getR() | Gets or sets the red component. |
setR(double value) | Gets or sets the red component. |
getG() | Gets or sets the green component. |
setG(double value) | Gets or sets the green component. |
getB() | Gets or sets the blue component. |
setB(double value) | Gets or sets the blue component. |
accept(IOperatorSelector visitor) | Accepts visitor object to process operator. |
toString() | Returns string representation of color. |
SetColor()
public SetColor()
Initializes operator.
SetColor(int index, ICommand command)
public SetColor(int index, ICommand command)
Constructor for operator class.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Index of operator. |
command | ICommand | Operator command. |
SetColor(double g)
public SetColor(double g)
Set color for stroking operators for DeviceGray, CalGray and Indexed color spaces.
Parameters:
Parameter | Type | Description |
---|---|---|
g | double | Color value. |
SetColor(double r, double g, double b)
public SetColor(double r, double g, double b)
Set color for stroking operator for DeviceRGB, CalRGB, and Lab color spaces
Parameters:
Parameter | Type | Description |
---|---|---|
r | double | Red component. |
g | double | Green component. |
b | double | Blue component. |
SetColor(double c, double m, double y, double k)
public SetColor(double c, double m, double y, double k)
Set color for non-stroking operator for CMYK color space
Parameters:
Parameter | Type | Description |
---|---|---|
c | double | Cyan component. |
m | double | Magenta component. |
y | double | Yellow component. |
k | double | Black component. |
SetColor(double[] color)
public SetColor(double[] color)
Constructor which allows to specify color components.
Parameters:
Parameter | Type | Description |
---|---|---|
color | double[] | Array of color components. |
getColor()
public Color getColor()
Not supported yet.
Returns color specified by the operator.
Returns: Color - Operator color.
getC()
public final double getC()
Gets or sets the cyan component.
Returns: double - doable value
setC(double value)
public final void setC(double value)
Gets or sets the cyan component.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | doable value |
getM()
public final double getM()
Gets or sets the magenta component.
Returns: double - doable value
setM(double value)
public final void setM(double value)
Gets or sets the magenta component.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | doable value |
getY()
public final double getY()
Gets or sets the yellow component.
Returns: double - doable value
setY(double value)
public final void setY(double value)
Gets or sets the yellow component.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | doable value |
getK()
public final double getK()
Gets or sets the black component.
Returns: double - doable value
setK(double value)
public final void setK(double value)
Gets or sets the black component.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | doable value |
getR()
public final double getR()
Gets or sets the red component.
Value: The level of red from 0.0 to 1.0
Returns: double - doable value
setR(double value)
public final void setR(double value)
Gets or sets the red component.
Value: The level of red from 0.0 to 1.0
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | doable value |
getG()
public final double getG()
Gets or sets the green component.
Value: The level of green from 0.0 to 1.0
Returns: double - doable value
setG(double value)
public final void setG(double value)
Gets or sets the green component.
Value: The level of green from 0.0 to 1.0
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | doable value |
getB()
public final double getB()
Gets or sets the blue component.
Value: The level of blue from 0.0 to 1.0
Returns: double - doable value
setB(double value)
public final void setB(double value)
Gets or sets the blue component.
Value: The level of blue from 0.0 to 1.0
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | doable value |
accept(IOperatorSelector visitor)
public void accept(IOperatorSelector visitor)
Accepts visitor object to process operator.
Parameters:
Parameter | Type | Description |
---|---|---|
visitor | IOperatorSelector | Visitor object. |
toString()
public String toString()
Returns string representation of color.
Returns: java.lang.String - String representation of color.