SetRGBColor
Overview
SetRGBColor is a class in Aspose.PDF FOSS for .NET.
Inherits from: Operator.
rg — Set RGB fill color.
This class declares 8 methods for SetRGBColor objects in .NET programs.
Available methods include: Accept, IsTextShowOperator, SetRGBColor, ToPdf, ToString, ValueEquals, getColor.
Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: B, CommandName, G, Index, R.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
R | double | Read/Write | Gets or sets the red component of the fill color, from 0 (none) to 1 (full). |
G | double | Read/Write | Gets or sets the green component of the fill color, from 0 (none) to 1 (full). |
B | double | Read/Write | Gets or sets the blue component of the fill color, from 0 (none) to 1 (full). |
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 |
|---|---|
SetRGBColor(r: double, g: double, b: double) | Creates an rg operator that sets the fill color to the given red, green and blue components, each from 0 (none) to 1 (full). |
SetRGBColor(color: System.Drawing.Color) | Creates an rg operator from a System.Drawing.Color: each 0-255 channel is divided by 255, and the alpha channel is ignored. |
ToPdf() | Calls ToPdf on this SetRGBColor instance. |
ToString() | Calls ToString on this SetRGBColor instance. |
Accept(visitor: IOperatorSelector) | Calls Accept(visitor) on this SetRGBColor instance. |
getColor() | Returns the fill color as a System.Drawing.Color, with each component scaled to 0-255 and clamped. |
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. |