[]
Determines the coordinates for all lines and glyph runs. Optionally calls RecalculateGlyphs() prior to performing the layout.
public bool PerformLayout(bool recalculateGlyphsBeforeLayout = false)
Public Function PerformLayout(Optional recalculateGlyphsBeforeLayout As Boolean = False) As Boolean
Type | Name | Description |
---|---|---|
bool | recalculateGlyphsBeforeLayout | If true, RecalculateGlyphs() will be called before performing the layout. |
Type | Description |
---|---|
bool | true if the whole text fits in the bounds of TextLayout, false if some text doesn't fit in bounds and one of the Split* methods must be executed to move the rest of the text into another TextLayout instance. |
When all text and formatting have been specified on an instance of TextLayout, RecalculateGlyphs() must be called on it to convert characters to glyphs. After that, PerformLayout(false) can be called multiple times for different layout parameters (such as MaxWidth and MaxHeight to create different layouts of the same text.When only a single layout for each text is needed, the two calls can be shortened to just one PerformLayout(true) call for convenience.