Struct TextDecoration
Text decoration (underline or strikethrough) applied to text content.
Implements
Inherited Members
Namespace: DRIT.Pdf.Content
Assembly: DRIT.Pdf.dll
Syntax
public readonly struct TextDecoration : IEquatable<TextDecoration>
Constructors
TextDecoration(TextDecorationStyle, PdfColor?, bool)
Initializes a text decoration.
Declaration
public TextDecoration(TextDecorationStyle style, PdfColor? color = null, bool isStrikethrough = false)
Parameters
| Type | Name | Description |
|---|---|---|
| TextDecorationStyle | style | |
| PdfColor? | color | |
| bool | isStrikethrough |
Fields
None
No decoration.
Declaration
public static readonly TextDecoration None
Field Value
| Type | Description |
|---|---|
| TextDecoration |
Properties
Color
Gets the decoration color. Null means inherit text color.
Declaration
public PdfColor? Color { get; }
Property Value
| Type | Description |
|---|---|
| PdfColor? |
IsStrikethrough
Gets whether this is a strikethrough (vs. underline).
Declaration
public bool IsStrikethrough { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Strikethrough
Single strikethrough.
Declaration
public static TextDecoration Strikethrough { get; }
Property Value
| Type | Description |
|---|---|
| TextDecoration |
Style
Gets the decoration style.
Declaration
public TextDecorationStyle Style { get; }
Property Value
| Type | Description |
|---|---|
| TextDecorationStyle |
Underline
Single underline.
Declaration
public static TextDecoration Underline { get; }
Property Value
| Type | Description |
|---|---|
| TextDecoration |
Methods
Equals(TextDecoration)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(TextDecoration other)
Parameters
| Type | Name | Description |
|---|---|---|
| TextDecoration | other | An object to compare with this object. |
Returns
| Type | Description |
|---|---|
| bool | true if the current object is equal to the |
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with the current instance. |
Returns
| Type | Description |
|---|---|
| bool | true if |
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
Operators
operator ==(TextDecoration, TextDecoration)
Equality operator.
Declaration
public static bool operator ==(TextDecoration a, TextDecoration b)
Parameters
| Type | Name | Description |
|---|---|---|
| TextDecoration | a | |
| TextDecoration | b |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(TextDecoration, TextDecoration)
Inequality operator.
Declaration
public static bool operator !=(TextDecoration a, TextDecoration b)
Parameters
| Type | Name | Description |
|---|---|---|
| TextDecoration | a | |
| TextDecoration | b |
Returns
| Type | Description |
|---|---|
| bool |