XDrawText - Online Linux Manual PageSection : 3
Updated : libX11 1.8.4
Source : X Version 11
Note : XLIB FUNCTIONS

NAMEXDrawText, XDrawText16, XTextItem, XTextItem16 − draw polytext text and text drawing structures

SYNTAXint XDrawText ( Display *display , Drawable d , GC gc , int x , int y , XTextItem *items , int nitems); int XDrawText16 ( Display *display , Drawable d , GC gc , int x , int y , XTextItem16 *items , int nitems);

ARGUMENTSd Specifies the drawable. display Specifies the connection to the X server. gc Specifies the GC. items Specifies an array of text items. nitems Specifies the number of text items in the array. x 
.ns
y Specify the x and y coordinates, which are relative to the origin of the specified drawable and define the origin of the first character.

DESCRIPTIONThe XDrawText16 function is similar to XDrawText except that it uses 2-byte or 16-bit characters. Both functions allow complex spacing and font shifts between counted strings. Each text item is processed in turn. A font member other than None in an item causes the font to be stored in the GC and used for subsequent text. A text element delta specifies an additional change in the position along the x axis before the string is drawn. The delta is always added to the character origin and is not dependent on any characteristics of the font. Each character image, as defined by the font in the GC, is treated as an additional mask for a fill operation on the drawable. The drawable is modified only where the font character has a bit set to 1. If a text item generates a BadFont error, the previous text items may have been drawn. For fonts defined with linear indexing rather than 2-byte matrix indexing, each XChar2b structure is interpreted as a 16-bit number with byte1 as the most significant byte. Both functions use these GC components: function, plane-mask, fill-style, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. They also use these GC mode-dependent components: foreground, background, tile, stipple, tile-stipple-x-origin, and tile-stipple-y-origin. XDrawText and XDrawText16 can generate BadDrawable, BadFont, BadGC, and BadMatch errors.

STRUCTURESThe XTextItem and XTextItem16 structures contain: typedef struct { char *chars; /​* pointer to string */ int nchars; /​* number of characters */ int delta; /​* delta between strings */ Font font; /​* Font to print it in, None don't change */ } XTextItem;typedef struct { XChar2b *chars; /​* pointer to two-byte characters */ int nchars; /​* number of characters */ int delta; /​* delta between strings */ Font font; /​* font to print it in, None don't change */ } XTextItem16;If the font member is not None, the font is changed before printing and also is stored in the GC. If an error was generated during text drawing, the previous items may have been drawn. The baseline of the characters are drawn starting at the x and y coordinates that you pass in the text drawing functions. For example, consider the background rectangle drawn by XDrawImageString. If you want the upper-left corner of the background rectangle to be at pixel coordinate (x,y), pass the (x,y + ascent) as the baseline origin coordinates to the text functions. The ascent is the font ascent, as given in the XFontStruct structure. If you want the lower-left corner of the background rectangle to be at pixel coordinate (x,y), pass the (x,y − descent + 1) as the baseline origin coordinates to the text functions. The descent is the font descent, as given in the XFontStruct structure.

DIAGNOSTICSBadDrawable  A value for a Drawable argument does not name a defined Window or Pixmap. BadFont  A value for a Font or GContext argument does not name a defined Font. BadGC  A value for a GContext argument does not name a defined GContext. BadMatch  An InputOnly window is used as a Drawable.

SEE ALSOXDrawImageString(3), XDrawString(3), XLoadFont(3)
Xlib − C Language X Interface
0
Johanes Gumabo
Data Size   :   12,675 byte
man-XDrawText16.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 190,628
Visitor ID   :     :  
Visitor IP   :   18.188.218.219   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|XDrawText.3|72|ns|.ns )