NAME

XDrawString, XDrawString16 - draw text characters

SYNTAX

int XDrawString(Display *_d_i_s_p_l_a_y, Drawable _d, GC _g_c, int _x, int _y, char *_s_t_r_i_n_g, int _l_e_n_g_t_h); int XDrawString16(Display *_d_i_s_p_l_a_y, Drawable _d, GC _g_c, int _x, int _y, XChar2b *_s_t_r_i_n_g, int _l_e_n_g_t_h);

ARGUMENTS

_d Specifies the drawable.
_d_i_s_p_l_a_y Specifies the connection to the X server.
_g_c Specifies the GC.
_l_e_n_g_t_h Specifies the number of characters in the string argument.
_s_t_r_i_n_g Specifies the character string.
and define the origin of the first character
_x
_y Specify the x and y coordinates, which are relative to the origin of the specified drawable.

DESCRIPTION

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. For fonts defined with 2-byte matrix indexing and used with _X_D_r_a_w_S_t_r_i_n_g_1_6, each byte is used as a byte2 with a byte1 of zero.

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.

_X_D_r_a_w_S_t_r_i_n_g and _X_D_r_a_w_S_t_r_i_n_g_1_6 can generate _B_a_d_D_r_a_w_a_b_l_e, _B_a_d_G_C, and _B_a_d_M_a_t_c_h errors.

DIAGNOSTICS

_B_a_d_D_r_a_w_a_b_l_e
A value for a Drawable argument does not name a defined Window or Pixmap.
_B_a_d_G_C
A value for a GContext argument does not name a defined GContext.
_B_a_d_M_a_t_c_h
An _I_n_p_u_t_O_n_l_y window is used as a Drawable.
_B_a_d_M_a_t_c_h
Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request.

SEE ALSO

XDrawImageString(3X11), XDrawText(3X11), XLoadFont(3X11)
_X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e