Get the spatial size of a string.
::get_string_extents queries width and height of the output size of a string using the font of the window. In addition the extension above and below the current baseline for writing is returned (Ascent bzw. Descent).
The sizes are measured in the coordinate system of the window (for text windows in pixels). Using ::get_string_extents it is possible to determine text output and input independently from the used font. The conversion from integer numbers and floating point numbers to text strings is the same as in ::write_string.
|
WindowHandle (input_control) |
window -> HTuple.long |
| Window identifier. | |
|
Values (input_control) |
string(-array) -> HTuple.char * / double / long |
| Values to consider. | |
| Default value: 'test_string' | |
|
Ascent (output_control) |
integer -> long * |
| Maximum height above baseline for writing. | |
|
Descent (output_control) |
integer -> long * |
| Maximum extension below baseline for writing. | |
|
Width (output_control) |
integer -> long * |
| Text width. | |
|
Height (output_control) |
integer -> long * |
| Text height. | |
::get_string_extents returns H_MSG_TRUE if the window is valid. Otherwise an exception handling is raised.
::open_window, ::open_textwindow, ::set_font
::set_tposition, ::write_string, ::read_string, ::read_char
System