Class FormattedTextLine
A single explicitly laid-out line of text. The caller owns line breaking; the PDF library only emits the supplied segments.
Inherited Members
Namespace: DRIT.Pdf.Content
Assembly: DRIT.Pdf.dll
Syntax
public sealed class FormattedTextLine
Constructors
FormattedTextLine(IEnumerable<FormattedTextSegment>, double, double)
Initializes an explicitly laid-out line.
Declaration
public FormattedTextLine(IEnumerable<FormattedTextSegment> segments, double width, double lineHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<FormattedTextSegment> | segments | |
| double | width | |
| double | lineHeight |
Properties
LineHeight
Gets the line height (including leading) in points.
Declaration
public double LineHeight { get; }
Property Value
| Type | Description |
|---|---|
| double |
SegmentCount
Gets the number of text segments in this line.
Declaration
public int SegmentCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
SegmentTexts
Gets the text of each segment in this line.
Declaration
public IEnumerable<string> SegmentTexts { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<string> |
Segments
Gets the styled segments in this line.
Declaration
public IReadOnlyList<FormattedTextSegment> Segments { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<FormattedTextSegment> |
Text
Gets the concatenated text of all segments in this line.
Declaration
public string Text { get; }
Property Value
| Type | Description |
|---|---|
| string |
Width
Gets the total width of this line in points.
Declaration
public double Width { get; }
Property Value
| Type | Description |
|---|---|
| double |
Methods
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents the current object. |