get_font_extentsT_get_font_extentsGetFontExtentsGetFontExtentsget_font_extents (算子)

名称

get_font_extentsT_get_font_extentsGetFontExtentsGetFontExtentsget_font_extents — 获取字体所有字符的最大尺寸。

签名

get_font_extents( : : WindowHandle : MaxAscent, MaxDescent, MaxWidth, MaxHeight)

Herror T_get_font_extents(const Htuple WindowHandle, Htuple* MaxAscent, Htuple* MaxDescent, Htuple* MaxWidth, Htuple* MaxHeight)

void GetFontExtents(const HTuple& WindowHandle, HTuple* MaxAscent, HTuple* MaxDescent, HTuple* MaxWidth, HTuple* MaxHeight)

HTuple HWindow::GetFontExtents(HTuple* MaxDescent, HTuple* MaxWidth, HTuple* MaxHeight) const

Hlong HWindow::GetFontExtents(Hlong* MaxDescent, Hlong* MaxWidth, Hlong* MaxHeight) const

static void HOperatorSet.GetFontExtents(HTuple windowHandle, out HTuple maxAscent, out HTuple maxDescent, out HTuple maxWidth, out HTuple maxHeight)

HTuple HWindow.GetFontExtents(out HTuple maxDescent, out HTuple maxWidth, out HTuple maxHeight)

int HWindow.GetFontExtents(out int maxDescent, out int maxWidth, out int maxHeight)

def get_font_extents(window_handle: HHandle) -> Tuple[Union[int, float], Union[int, float], Union[int, float], Union[int, float]]

描述

get_font_extentsget_font_extentsGetFontExtentsGetFontExtentsGetFontExtentsget_font_extents queries the maximum width (MaxWidthMaxWidthMaxWidthMaxWidthmaxWidthmax_width), height (MaxHeightMaxHeightMaxHeightMaxHeightmaxHeightmax_height), and extension above and below the baseline (MaxAscentMaxAscentMaxAscentMaxAscentmaxAscentmax_ascent and MaxDescentMaxDescentMaxDescentMaxDescentmaxDescentmax_descent, respectively) of the font that is currently set for the window WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle. The sizes are measured in pixels.

执行信息

参数

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (输入控制)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

窗口句柄。

MaxAscentMaxAscentMaxAscentMaxAscentmaxAscentmax_ascent (输出控制)  extent.y HTupleUnion[int, float]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)

Maximum height above baseline.

MaxDescentMaxDescentMaxDescentMaxDescentmaxDescentmax_descent (输出控制)  extent.y HTupleUnion[int, float]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)

Maximum extension below baseline.

MaxWidthMaxWidthMaxWidthMaxWidthmaxWidthmax_width (输出控制)  extent.x HTupleUnion[int, float]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)

Maximum character width.

MaxHeightMaxHeightMaxHeightMaxHeightmaxHeightmax_height (输出控制)  extent.y HTupleUnion[int, float]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)

Maximum character height.

结果

get_font_extentsget_font_extentsGetFontExtentsGetFontExtentsGetFontExtentsget_font_extents returns 2 ( H_MSG_TRUE) if the window is valid.否则将抛出异常。

可能的前趋

open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window, set_fontset_fontSetFontSetFontSetFontset_font

可能的后继

set_tpositionset_tpositionSetTpositionSetTpositionSetTpositionset_tposition, write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string, read_stringread_stringReadStringReadStringReadStringread_string, read_charread_charReadCharReadCharReadCharread_char

另见

get_string_extentsget_string_extentsGetStringExtentsGetStringExtentsGetStringExtentsget_string_extents, set_tpositionset_tpositionSetTpositionSetTpositionSetTpositionset_tposition, set_fontset_fontSetFontSetFontSetFontset_font

模块

基础