SetRGBColor
Inheritance: java.lang.Object, com.aspose.pdf.Operator, com.aspose.pdf.operators.SetColorOperator
public class SetRGBColor extends SetColorOperator
Class representing rg operator (set RGB color for non-stroking operators).
Constructors
Constructor | Description |
---|---|
SetRGBColor(int index, ICommand command) | Constructor for operator class. |
SetRGBColor(double r, double g, double b) | Constructor for writing program. |
SetRGBColor(Color color) | Initializes operator with color. |
Methods
Method | Description |
---|---|
getColor() | Returns color specified by operator. |
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 text representation of the operator. |
getCMYKColor(double[] rgb, double[] cmykOut) |
SetRGBColor(int index, ICommand command)
public SetRGBColor(int index, ICommand command)
Constructor for operator class.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Index of operator. |
command | ICommand | Operator command. |
SetRGBColor(double r, double g, double b)
public SetRGBColor(double r, double g, double b)
Constructor for writing program.
Parameters:
Parameter | Type | Description |
---|---|---|
r | double | The level of red from 0.0 to 1.0 |
g | double | The level of green from 0.0 to 1.0 |
b | double | The level of blue from 0.0 to 1.0 |
SetRGBColor(Color color)
public SetRGBColor(Color color)
Initializes operator with color.
Parameters:
Parameter | Type | Description |
---|---|---|
color | java.awt.Color | Specified color. |
getColor()
public Color getColor()
Returns color specified by operator.
Returns: Color - Color specified by operator.
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 text representation of the operator.
Returns: java.lang.String - Text representation of operator.
getCMYKColor(double[] rgb, double[] cmykOut)
public void getCMYKColor(double[] rgb, double[] cmykOut)
Parameters:
Parameter | Type | Description |
---|---|---|
rgb | double[] | |
cmykOut | double[] |