StiTextDrawing Class
Namespace: Stimulsoft.Base.Drawing
Class contains methods for text drawing.
Properties
| Property | Type | Description |
|---|---|---|
MeasureTrailingSpaces static |
bool | Gets or sets value which indicates that text drawing engine will be measure text string including trailing spaces. |
Methods
| Method | Returns | Description |
|---|---|---|
BreakTextWidth static |
string | |
CutLineLimit static |
string | |
GetAlignment static (+1 overloads) |
StringAlignment | |
| GetRect | RectangleF | |
GetTexts static |
Word[] | Returns the collection of the words. |
MeasureString static |
SizeF | |
MeasureStringWidth static |
SizeF | Draws the text aligned to width. |
| SetText | void | |
SplitString static |
List |
|
SplitTextWordwrap static (+1 overloads) |
List |
|
SplitTextWordwrapWidth static |
List |
Method Details
BreakTextWidth static
BreakTextWidth(g: Graphics, text: string, font: Font, rect: RectangleD, stringFormat: StringFormat, lineHeight: double): string
Parameters
- g (Graphics)
- text (string)
- font (Font)
- rect (RectangleD)
- stringFormat (StringFormat)
- lineHeight (double)
Returns string
CutLineLimit static
CutLineLimit(text: string, g: Graphics, font: Font, rect: RectangleD, textOptions: StiTextOptions, typographic: bool, isWindows: bool): string
Parameters
- text (string)
- g (Graphics)
- font (Font)
- rect (RectangleD)
- textOptions (StiTextOptions)
- typographic (bool)
- isWindows (bool)
Returns string
GetAlignment static
GetAlignment(alignment: StiTextHorAlignment): StringAlignment
Parameters
- alignment (StiTextHorAlignment)
Returns StringAlignment
GetAlignment(alignment: StiVertAlignment): StringAlignment
Parameters
- alignment (StiVertAlignment)
Returns StringAlignment
GetRect
GetRect(index: int): RectangleF
Parameters
- index (int)
Returns RectangleF
GetTexts static
GetTexts(str: string): Word[]
Returns the collection of the words.
Parameters
- str (string)
Returns Word[]
MeasureString static
MeasureString(g: Graphics, text: string, font: Font): SizeF
Parameters
Returns SizeF
MeasureStringWidth static
MeasureStringWidth(g: Graphics, text: string, font: Font, size: SizeD, stringFormat: StringFormat, lineHeight: double): SizeF
Draws the text aligned to width.
Parameters
- g (Graphics) — Graphics to draw on.
- text (string) — Text to draw on.
- font (Font) — Font to draw on.
- size (SizeD) — Size of rectangle to draw on.
- stringFormat (StringFormat) — Text format.
- lineHeight (double)
Returns SizeF
SetText
SetText(st: string): void
Parameters
- st (string)
SplitString static
SplitString(inputString: string, removeControl: bool): List
Parameters
- inputString (string)
- removeControl (bool)
Returns List
SplitTextWordwrap static
SplitTextWordwrap(text: string, g: Graphics, font: Font, rect: RectangleD, textOptions: StiTextOptions, ha: StiTextHorAlignment, typographic: bool): List
Parameters
- text (string)
- g (Graphics)
- font (Font)
- rect (RectangleD)
- textOptions (StiTextOptions)
- ha (StiTextHorAlignment)
- typographic (bool)
Returns List
SplitTextWordwrap(text: string, g: Graphics, font: Font, rect: RectangleD, sfBase: StringFormat, horAlignWidth: bool): List
Parameters
- text (string)
- g (Graphics)
- font (Font)
- rect (RectangleD)
- sfBase (StringFormat)
- horAlignWidth (bool)
Returns List
SplitTextWordwrapWidth static
SplitTextWordwrapWidth(text: string, g: Graphics, font: Font, rect: RectangleD): List
Parameters
- text (string)
- g (Graphics)
- font (Font)
- rect (RectangleD)
Returns List
Fields
| Field | Type | Description |
|---|---|---|
| Count | int | |
| IsEnd | bool | Is end range. |
| IsEnter | bool | |
| IsEnter | bool | |
| IsStart | bool | Is start range. |
| NewLineForm | bool | After this range, new line is starting. |
| Pos | PointD | Position of range. |
| Size | SizeD | Size of range. |
| Start | int | |
| Text | string | Contents of range. |
| Text | string |