[]
Measure the displayed size of rich text in context.
Size MeasureText(RichText richText, Font baseFont, Size size, bool wordWrap)
Function MeasureText(richText As RichText, baseFont As Font, size As Size, wordWrap As Boolean) As Size
Type | Name | Description |
---|---|---|
RichText | richText | Rich text content. |
Font | baseFont | Base font of rich text. |
Size | size | The current boundary size. |
bool | wordWrap | true if allow word wrap and false for otherwise. |
Type | Description |
---|---|
Size | The Size represent displayed size of rich text. |
Measure the displayed size of rich text in context.
Size MeasureText(TextDocument text, TextFormat baseFormat, Size size)
Function MeasureText(text As TextDocument, baseFormat As TextFormat, size As Size) As Size
Type | Name | Description |
---|---|---|
TextDocument | text | The text document. |
TextFormat | baseFormat | Base format of rich text. |
Size | size | The current boundary size. |
Type | Description |
---|---|
Size | The Size represent displayed size of rich text. |
Measure the size of a string in the context.
Size MeasureText(string str, Font font, Size size, DrawingTextFormat drawingTextFormat = DrawingTextFormat.None, double rotation = 0)
Function MeasureText(str As String, font As Font, size As Size, Optional drawingTextFormat As DrawingTextFormat = DrawingTextFormat.None, Optional rotation As Double = 0) As Size
Type | Name | Description |
---|---|---|
string | str | String content |
Font | font | Font to measure |
Size | size | The current boundary size. |
DrawingTextFormat | drawingTextFormat | DrawingTextFormat structure that specifies the drawing text format. |
double | rotation |
Type | Description |
---|---|
Size | The size of displayed string. |