SetColor
Overview
SetColor is a class in Aspose.PDF FOSS for .NET.
Inherits from: SetColorOperator.
sc — Set color in current color space (non-stroking).
This class declares 11 methods for SetColor objects in .NET programs.
Available methods include: Accept, IsTextShowOperator, SetColor, 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 fill color components, interpreted in the current fill 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 |
|---|---|
SetColor() | Creates an sc operator with no color components. |
SetColor(g: double) | Creates an sc operator with one component, such as a gray level. |
SetColor(r: double, g: double, b: double) | Creates an sc operator with three components, such as red, green and blue. |
SetColor(c: double, m: double, y: double, k: double) | Creates an sc operator with four components, such as cyan, magenta, yellow and black. |
SetColor(color: double[]) | Creates an sc operator with the given components; a null array gives no components. |
ToPdf() | Calls ToPdf on this SetColor instance. |
ToString() | Calls ToString on this SetColor instance. |
Accept(visitor: IOperatorSelector) | Calls Accept(visitor) on this SetColor instance. |
getColor() | Calls getColor on this SetColor instance. |
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. |