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
| Name | Type | Access | Description |
|---|---|---|---|
Color | double[] | Read | Gets the stroke color components, interpreted in the current stroke color space. |
R | double | Read/Write | Gets or sets the red component (the first of three); reads 0 unless the color has at least three components. |
G | double | Read/Write | Gets or sets the green component (the second of three), or the gray level when the color has a single component; reads 0 otherwise. |
B | double | Read/Write | Gets or sets the blue component (the third of three); reads 0 unless the color has at least three components. |
C | double | Read/Write | Gets or sets the cyan component (the first of four); reads 0 unless the color has exactly four components. |
M | double | Read/Write | Gets or sets the magenta component (the second of four); reads 0 unless the color has exactly four components. |
Y | double | Read/Write | Gets or sets the yellow component (the third of four); reads 0 unless the color has exactly four components. |
K | double | Read/Write | Gets or sets the black component (the fourth of four); reads 0 unless the color has exactly four components. |
CommandName | string | Read | The PDF command name (last token of the serialised form, e.g. |
Index | int | Read/Write | 1-based position of this operator within its containing OperatorCollection. |
Methods
| Signature | Description |
|---|---|
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. |