PdfTextSegment Struct
An element of a text shown with individual glyph positioning (the TJ operator, ISO 32000-2, 9.4.3): a text, or an adjustment of the position.
public readonly struct PdfTextSegment : IEquatable<PdfTextSegment>- Implements
Properties
| Name | Description |
|---|---|
| Adjustment | Gets the adjustment in thousandths of the font size: a positive value moves the next glyph to the left (horizontal writing). |
| Text | Gets the text, or null for an adjustment. |
Adjustment
PdfTextSegment.csMethods
| Name | Description |
|---|---|
| Equals(PdfTextSegment) | Indicates whether the current object is equal to another object of the same type. |
| Equals(object?) | Indicates whether this instance and a specified object are equal. |
| FromAdjustment(double) | Creates an adjustment. |
| FromText(string) | Creates a text segment. |
| GetHashCode() | Returns the hash code for this instance. |
Equals overloads
Equals(PdfTextSegment)
PdfTextSegment.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(PdfTextSegment other)Parameters
otherPdfTextSegment- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.
Equals(object?)
PdfTextSegment.csFromAdjustment(double)
PdfTextSegment.csCreates an adjustment.
public static PdfTextSegment FromAdjustment(double adjustment)Parameters
adjustmentdouble- The adjustment, in thousandths of the font size.
Returns
PdfTextSegment The segment.
FromText(string)
PdfTextSegment.csCreates a text segment.
public static PdfTextSegment FromText(string text)GetHashCode()
PdfTextSegment.csOperators
| Name | Description |
|---|---|
| operator ==(PdfTextSegment, PdfTextSegment) | Indicates whether two segments are equal. |
| implicit operator PdfTextSegment(double) | Converts an adjustment to a segment. |
| implicit operator PdfTextSegment(string) | Converts a text to a segment. |
| operator !=(PdfTextSegment, PdfTextSegment) | Indicates whether two segments are different. |
operator ==(PdfTextSegment, PdfTextSegment)
PdfTextSegment.csIndicates whether two segments are equal.
public static bool operator ==(PdfTextSegment left, PdfTextSegment right)Parameters
leftPdfTextSegment- The first segment.
rightPdfTextSegment- The second segment.
Returns
bool true when the segments are equal.
op_Implicit overloads
implicit operator PdfTextSegment(double)
PdfTextSegment.csConverts an adjustment to a segment.
public static implicit operator PdfTextSegment(double adjustment)implicit operator PdfTextSegment(string)
PdfTextSegment.csConverts a text to a segment.
public static implicit operator PdfTextSegment(string text)operator !=(PdfTextSegment, PdfTextSegment)
PdfTextSegment.csIndicates whether two segments are different.
public static bool operator !=(PdfTextSegment left, PdfTextSegment right)Parameters
leftPdfTextSegment- The first segment.
rightPdfTextSegment- The second segment.
Returns
bool true when the segments are different.