HALCON Reference Manual 10.0.2
Name
get_string_extentsget_string_extentsget_string_extentsGetStringExtentsGetStringExtents — Get the spatial size of a string.
Herror get_string_extents(const Hlong WindowHandle, const char* Values, Hlong* Ascent, Hlong* Descent, Hlong* Width, Hlong* Height)
Herror T_get_string_extents(const Htuple WindowHandle, const Htuple Values, Htuple* Ascent, Htuple* Descent, Htuple* Width, Htuple* Height)
static void HOperatorSet.GetStringExtents(HTuple windowHandle, HTuple values, out HTuple ascent, out HTuple descent, out HTuple width, out HTuple height)
int HWindow.GetStringExtents(HTuple values, out int descent, out int width, out int height)
int HWindow.GetStringExtents(string values, out int descent, out int width, out int height)
get_string_extentsget_string_extentsget_string_extentsGetStringExtentsGetStringExtents 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 baseline is returned (AscentAscentAscentAscentascent
and DescentDescentDescentDescentdescent, respectively).
The sizes are measured in the coordinate system of the window (for
text windows in pixels). Using get_string_extentsget_string_extentsget_string_extentsGetStringExtentsGetStringExtents, 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_stringwrite_stringwrite_stringWriteStringWriteString.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: local (may only be called from the same thread in which the window, model, or tool instance was created).
- Processed without parallelization.
ValuesValuesValuesValuesvalues (input_control) string(-array) → HTupleHTupleVARIANTHtuple (string / real / integer) (string / double / int / long) (char* / double / Hlong) (BSTR / double / Hlong) (char* / double / Hlong)
Values to consider.
Default value:
'test_string'
"test_string"
"test_string"
"test_string"
"test_string"
Maximum height above baseline.
Maximum extension below baseline.
get_string_extentsget_string_extentsget_string_extentsGetStringExtentsGetStringExtents returns 2 (H_MSG_TRUE) if the window is valid.
Otherwise an exception is raised.
open_windowopen_windowopen_windowOpenWindowOpenWindow,
open_textwindowopen_textwindowopen_textwindowOpenTextwindowOpenTextwindow,
set_fontset_fontset_fontSetFontSetFont
set_tpositionset_tpositionset_tpositionSetTpositionSetTposition,
write_stringwrite_stringwrite_stringWriteStringWriteString,
read_stringread_stringread_stringReadStringReadString,
read_charread_charread_charReadCharReadChar
get_font_extentsget_font_extentsget_font_extentsGetFontExtentsGetFontExtents,
set_tpositionset_tpositionset_tpositionSetTpositionSetTposition,
set_fontset_fontset_fontSetFontSetFont
Foundation
| HALCON Reference Manual 10.0.2 |
Copyright © 1996-2011 MVTec Software GmbH |