Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mdraw_text_extents(3m17n) [debian man page]

mdraw_text_extents(3m17n)					 The m17n Library					 mdraw_text_extents(3m17n)

NAME
mdraw_text_extents - Compute text pixel width. SYNOPSIS
int mdraw_text_extents (MFrame * frame, MText * mt, int from, int to, MDrawControl * control, MDrawMetric * overall_ink_return, MDrawMetric * overall_logical_return, MDrawMetric * overall_line_return) DESCRIPTION
Compute text pixel width. The mdraw_text_extents() function computes the width of text between from and to of M-text mt when it is drawn on a window of frame frame using the mdraw_text_with_control() function with the drawing control object control. If overall_ink_return is not NULL, this function also computes the bounding box of character ink of the M-text, and stores the results in the members of the structure pointed to by overall_ink_return. If the M-text has a face specifying a surrounding box, the box is included in the bounding box. If overall_logical_return is not NULL, this function also computes the bounding box that provides minimum spacing to other graphical features (such as surrounding box) for the M-text, and stores the results in the members of the structure pointed to by overall_logical_return. If overall_line_return is not NULL, this function also computes the bounding box that provides minimum spacing to the other M-text drawn, and stores the results in the members of the structure pointed to by overall_line_return. This is a union of overall_ink_return and overall_logical_return if the members min_line_ascent, min_line_descent, max_line_ascent, and max_line_descent of control are all zero. RETURN VALUE
This function returns the width of the text to be drawn in the unit of pixels. If control->two_dimensional is nonzero and the text is drawn in multiple physical lines, it returns the width of the widest line. If an error occurs, it returns -1 and assigns an error code to the external variable merror_code. ERRORS
MERROR_RANGE COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA) Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST) Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>. Version 1.6.2 12 Jan 2011 mdraw_text_extents(3m17n)

Check Out this Related Man Page

XmbTextExtents(3X11)													      XmbTextExtents(3X11)

NAME
XmbTextExtents, XwcTextExtents - compute text extents SYNOPSIS
int XmbTextExtents(font_set, string, num_bytes, overall_ink_return, overall_logical_return) XFontSet font_set; char *string; int num_bytes; XRectangle *overall_ink_return; XRectangle *overall_logical_return; int XwcTextExtents(font_set, string, num_wchars, overall_ink_return, overall_logical_return) XFontSet font_set; wchar_t *string; int num_wchars; XRectangle *overall_ink_return; XRectangle *overall_logical_return; ARGUMENTS
Specifies the font set. Specifies the number of bytes in the string argument. Specifies the number of characters in the string argument. Returns the overall ink dimensions. Returns the overall logical dimensions. Specifies the character string. DESCRIPTION
The XmbTextExtents and XwcTextExtents functions set the components of the specified overall_ink_return and overall_logical_return arguments to the overall bounding box of the string's image and a logical bounding box for spacing purposes, respectively. They return the value returned by XmbTextEscapement or XwcTextEscapement. These metrics are relative to the drawing origin of the string, using the fonts loaded for the specified font set. If the overall_ink_return argument is non-NULL, it is set to the bounding box of the string's character ink. The overall_ink_return for a nondescending, horizontally drawn Latin character is conventionally entirely above the baseline; that is, overall_ink_return.height <= -overall_ink_return.y. The overall_ink_return for a nonkerned character is entirely at, and to the right of, the origin; that is, over- all_ink_return.x >= 0. A character consisting of a single pixel at the origin would set overall_ink_return fields y = 0, x = 0, width = 1, and height = 1. If the overall_logical_return argument is non-NULL, it is set to the bounding box that provides minimum spacing to other graphical features for the string. Other graphical features, for example, a border surrounding the text, should not intersect this rectangle. When the XFontSet has missing charsets, metrics for each unavailable character are taken from the default string returned by XCreateFontSet so that the metrics represent the text as it will actually be drawn. The behavior for an invalid codepoint is undefined. SEE ALSO
XmbTextEscapement(3X11), XmbTextPerCharExtents(3X11) Xlib -- C Language X Interface XmbTextExtents(3X11)
Man Page