PEXQueryEncodedTextExtents(3) — Subroutines
Name
PEXQueryEncodedTextExtents - Query Encoded Text Extents
Synopsis
PEXTextExtent ∗PEXQueryEncodedTextExtents(Display ∗display, XID resource_id, unsigned int font_table_index, int path, double expansion, double spacing, double height, int halign, int valign, unsigned long count, PEXListOfEncodedText ∗encoded_text)
Arguments
displayA pointer to a display structure returned by a successful XOpenDisplay call.
resource_idThe resource identifier of either a renderer, a workstation or a text font table.
font_table_index
The text font table index.
pathThe text path (PEXPathRight, PEXPathLeft, PEXPathUp, PEXPathDown).
expansionThe text character expansion factor.
spacingThe text character spacing factor.
heightThe text character height.
halignThe text horizontal text alignment (PEXHAlignNormal, PEXHAlignLeft, PEXHAlignCenter, PEXHAlignRight).
valignThe text vertical text alignment (PEXVAlignNormal, PEXVAlignTop, PEXVAlignCap, PEXVAlignHalf, PEXVAlignBase, PEXVAlignBottom).
countThe number of encoded text strings.
encoded_textAn array of encoded text strings.
Returns
An array of text extents; a null pointer if unsuccessful.
Description
This function is like PEXQueryTextExtents, except that multiple encoded text strings are specified. Each text string in the encoded text list has a character set, a character set width, an encoding state, and a list of characters. (See PEXEncodedTextData.)
The character set is an index into the current font group. Font groups have individual fonts which are numbered starting at one; a value of three would select the third font in the font group currently being used. If a character set is not available in the current font group then the default font group is used. If a character set value is not available in the default font group then the result is implementation-dependent. The character set width indicates the width or size of characters in the strings. Valid values for character set width are PEXCSByte, PEXCSShort and PEXCSLong. The encoding state is provided for use by the application and is not interpreted by the PEX server.
All other aspects of this function are the same as PEXQueryTextExtents.
Data Structures
typedef struct {
unsigned short count;
PEXEncodedTextData ∗encoded_text;
} PEXListOfEncodedText;
typedef struct {
unsigned short character_set;
unsigned char character_set_width;
unsigned char encoding_state;
unsigned short reserved;
unsigned short length;
char ∗ch;
} PEXEncodedTextData;
typedef struct {
PEXCoord2D lower_left;
PEXCoord2D upper_right;
PEXCoord2D concat_point;
} PEXTextExtent;
typedef struct {
float x;
float y;
} PEXCoord2D;
Errors
BadMatchThe specified resource identifier identifies a table of type other than a text font table.
BadValueA specified value for one or text attributes is invalid, or the specified resource identifier does not identify a valid renderer, workstation or lookup table resource.
See Also
PEXQueryTextExtents