SetColorStroke

SetColorStroke

Overview

SetColorStroke is a class in Aspose.PDF FOSS for .NET. Inherits from: SetColorOperator.

SC — Set color in current color space (stroking).

This class declares 11 methods for SetColorStroke objects in .NET programs. Available methods include: Accept, IsTextShowOperator, SetColorStroke, ToPdf, ToString, ValueEquals, getColor. Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: B, C, Color, CommandName, G, Index, and 4 more.

Properties

NameTypeAccessDescription
Colordouble[]ReadGets the stroke color components, interpreted in the current stroke color space.
RdoubleRead/WriteGets or sets the red component (the first of three); reads 0 unless the color has at least three components.
GdoubleRead/WriteGets or sets the green component (the second of three), or the gray level when the color has a single component; reads 0 otherwise.
BdoubleRead/WriteGets or sets the blue component (the third of three); reads 0 unless the color has at least three components.
CdoubleRead/WriteGets or sets the cyan component (the first of four); reads 0 unless the color has exactly four components.
MdoubleRead/WriteGets or sets the magenta component (the second of four); reads 0 unless the color has exactly four components.
YdoubleRead/WriteGets or sets the yellow component (the third of four); reads 0 unless the color has exactly four components.
KdoubleRead/WriteGets or sets the black component (the fourth of four); reads 0 unless the color has exactly four components.
CommandNamestringReadThe PDF command name (last token of the serialised form, e.g.
IndexintRead/Write1-based position of this operator within its containing OperatorCollection.

Methods

SignatureDescription
SetColorStroke()Creates an SC operator with no color components.
SetColorStroke(g: double)Creates an SC operator with one component, such as a gray level.
SetColorStroke(r: double, g: double, b: double)Creates an SC operator with three components, such as red, green and blue.
SetColorStroke(c: double, m: double, y: double, k: double)Creates an SC operator with four components, such as cyan, magenta, yellow and black.
SetColorStroke(color: double[])Creates an SC operator with the given components; a null array gives no components.
ToPdf()Calls ToPdf on this SetColorStroke instance.
Accept(visitor: IOperatorSelector)Calls Accept(visitor) on this SetColorStroke instance.
getColor()Calls getColor on this SetColorStroke instance.
ToString()Default string form is the PDF serialisation, so callers (test helpers, debug logs) get the same content-stream text whether they hold an unparsed RawOperator or a typed subclass.
IsTextShowOperator(op: Operator)True when op is a text-showing operator (Tj / TJ / ’ / " — concrete subclasses of TextShowOperator).
ValueEquals(op: Operator)True when this operator’s serialised PDF form equals op’s.

See Also

 English