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

ConstructorDescription
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

MethodDescription
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:

ParameterTypeDescription
indexintIndex of operator.
commandICommandOperator command.

SetColor(double g)

public SetColor(double g)

Set color for stroking operators for DeviceGray, CalGray and Indexed color spaces.

Parameters:

ParameterTypeDescription
gdoubleColor 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:

ParameterTypeDescription
rdoubleRed component.
gdoubleGreen component.
bdoubleBlue 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:

ParameterTypeDescription
cdoubleCyan component.
mdoubleMagenta component.
ydoubleYellow component.
kdoubleBlack component.

SetColor(double[] color)

public SetColor(double[] color)

Constructor which allows to specify color components.

Parameters:

ParameterTypeDescription
colordouble[]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:

ParameterTypeDescription
valuedoubledoable 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:

ParameterTypeDescription
valuedoubledoable 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:

ParameterTypeDescription
valuedoubledoable 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:

ParameterTypeDescription
valuedoubledoable 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:

ParameterTypeDescription
valuedoubledoable 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:

ParameterTypeDescription
valuedoubledoable 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:

ParameterTypeDescription
valuedoubledoable value

accept(IOperatorSelector visitor)

public void accept(IOperatorSelector visitor)

Accepts visitor object to process operator.

Parameters:

ParameterTypeDescription
visitorIOperatorSelectorVisitor object.

toString()

public String toString()

Returns string representation of color.

Returns: java.lang.String - String representation of color.