SetGray

Inheritance: java.lang.Object, com.aspose.pdf.Operator, com.aspose.pdf.operators.SetColorOperator

public class SetGray extends SetColorOperator

Set gray level for non-stroking operations.

Constructors

ConstructorDescription
SetGray(int index, ICommand command)Constructor for operator class.
SetGray(double gray)Constructor for writing program.

Methods

MethodDescription
getColor()Returns color specified by operator.
getGray()Gets or sets the level of gray value.
setGray(double value)Gets or sets the level of gray value.
accept(IOperatorSelector visitor)Accepts visitor object to process operator.
toString()Returns string represnetation of operator.

SetGray(int index, ICommand command)

public SetGray(int index, ICommand command)

Constructor for operator class.

Parameters:

ParameterTypeDescription
indexintIndex of operator.
commandICommandOperator command.

SetGray(double gray)

public SetGray(double gray)

Constructor for writing program.

Parameters:

ParameterTypeDescription
graydoubleThe level of gray value.

getColor()

public Color getColor()

Returns color specified by operator.

Returns: Color - Color specified by operator.

getGray()

public final double getGray()

Gets or sets the level of gray value.

Returns: double - double value

setGray(double value)

public final void setGray(double value)

Gets or sets the level of gray value.

Parameters:

ParameterTypeDescription
valuedoubledouble 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 represnetation of operator.

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