Class FormattedTextSegment
A styled text segment used by FormattedTextLine.
Inherited Members
Namespace: DRIT.Pdf.Content
Assembly: DRIT.Pdf.dll
Syntax
public sealed class FormattedTextSegment
Constructors
FormattedTextSegment(string, PdfFontFamily, double, PdfFontWeight, PdfFontStyle, PdfColor, double)
Initializes a text segment with its complete PDF font state.
Declaration
public FormattedTextSegment(string text, PdfFontFamily fontFamily, double fontSize, PdfFontWeight fontWeight, PdfFontStyle fontStyle, PdfColor color, double baselineShiftPt = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | |
| PdfFontFamily | fontFamily | |
| double | fontSize | |
| PdfFontWeight | fontWeight | |
| PdfFontStyle | fontStyle | |
| PdfColor | color | |
| double | baselineShiftPt |
Properties
BaselineShiftPt
Gets the baseline shift in points; positive values raise the text.
Declaration
public double BaselineShiftPt { get; }
Property Value
| Type | Description |
|---|---|
| double |
Color
Gets the segment fill color.
Declaration
public PdfColor Color { get; }
Property Value
| Type | Description |
|---|---|
| PdfColor |
FontFamily
Gets the segment font family.
Declaration
public PdfFontFamily FontFamily { get; }
Property Value
| Type | Description |
|---|---|
| PdfFontFamily |
FontSize
Gets the segment font size in points.
Declaration
public double FontSize { get; }
Property Value
| Type | Description |
|---|---|
| double |
FontStyle
Gets the segment font style.
Declaration
public PdfFontStyle FontStyle { get; }
Property Value
| Type | Description |
|---|---|
| PdfFontStyle |
FontWeight
Gets the segment font weight.
Declaration
public PdfFontWeight FontWeight { get; }
Property Value
| Type | Description |
|---|---|
| PdfFontWeight |
Text
Gets the segment text.
Declaration
public string Text { get; }
Property Value
| Type | Description |
|---|---|
| string |