SetGray

Overview

SetGray is a class in Aspose.PDF FOSS for Java. Inherits from: SetColorOperator.

Set gray level for non-stroking operations operator (g).

This class provides 11 methods for working with SetGray objects in Java programs. Available methods include: Operator, SetGray, equals, getGray, getIndex, getName, getOperands, hashCode, setIndex, toString, writeTo. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package. Properties: gray, index, name, operands.

Properties

NameTypeAccessDescription
graydoubleReadReturns the gray level.
nameStringReadReturns the operator keyword.
indexintReadReturns the index of this operator within its parent {@link OperatorCollection},
or -1 if not set.
operandsList<COSBase>ReadReturns the operands as an unmodifiable list.

Methods

SignatureDescription
SetGray(gray: double)Creates a SetGray (g) operator with the specified gray level.
SetGray(operands: List<COSBase>)Creates a SetGray (g) operator from parsed operands.
getGray()doubleReturns the gray level.
Operator(name: String, operands: List<COSBase>)Creates an operator with the given name and operands.
getName()StringReturns the operator keyword.
getIndex()intReturns the index of this operator within its parent {@link OperatorCollection},
or -1 if not set.
setIndex(index: int)Sets the index of this operator within its parent collection.
getOperands()List<COSBase>Returns the operands as an unmodifiable list.
toString()StringReturns a string representation of this operator in content stream syntax.
writeTo(os: OutputStream)Writes this operator’s content-stream serialization to {@code os} preserving
exact operand bytes.
equals(o: Object)boolean
hashCode()int

See Also