![]() |
libgpac
Documentation of the core library of GPAC
|
import <evg.idl;
Public Member Functions | |
| Text () | |
| void | set_text (...) |
| TextMeasure | measure () |
| Path | get_path (optional bool centered_coords=true) |
Data Fields | |
| attribute Array | font |
| attribute double | fontsize |
| attribute unsigned long | align |
| attribute unsigned long | baseline |
| attribute boolean | horizontal |
| attribute boolean | flip |
| attribute boolean | underline |
| attribute boolean | bold |
| attribute boolean | italic |
| attribute double | maxWidth |
| attribute double | lineSpacing |
Text object
| Text::Text | ( | ) |
constructor. The default text is created with a font size of 12, horizontal drawing, start alignment and alphabetic baseline.
| void Text::set_text | ( | ... | ) |
sets text. Each argument is processed as follows:
Each element is treated as follows:
| TextMeasure Text::measure | ( | ) |
gets metrics for the text lines
gets a copy of the path data of the text. Usually only needed to do some path outlining of glyphs
| centered_coords | indicate of the path will be drawn on a centered coords surface. This is needed to perform final layout of text |
| attribute Array Text::font |
font name - array or single string value. If array, fonts in array will be checked until one is found The text must be set again whenever the font is changing !
| attribute double Text::fontsize |
font name
| attribute unsigned long Text::align |
align flag for horizontal positioning (see Canvas2D). Alignment is computed on maximum text line width after application of maxWidth if any/needed
| attribute unsigned long Text::baseline |
baseline flag for vertical positioning (see Canvas2D):
| attribute boolean Text::horizontal |
text is horizontal
| attribute boolean Text::flip |
text shoud be filpped while drawing
| attribute boolean Text::underline |
text shoud be underlined while drawing (not supported)
| attribute boolean Text::bold |
text shoud be bold (used when checking for font alternates)
| attribute boolean Text::italic |
text shoud be italic (used when checking for font alternates)
| attribute double Text::maxWidth |
maximum width of text in local coordinate system (with no matrix transformations)
| attribute double Text::lineSpacing |
line spacing. If 0, the font's default line spacing is used