NAME
XDrawImageString, XDrawImageString16 - draw image text
SYNTAX
int XDrawImageString(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 XDrawImageString16(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
The
_X_D_r_a_w_I_m_a_g_e_S_t_r_i_n_g_1_6
function is similar to
_X_D_r_a_w_I_m_a_g_e_S_t_r_i_n_g
except that it uses 2-byte or 16-bit characters.
Both functions also use both the foreground and background pixels
of the GC in the destination.
The effect is first to fill a
destination rectangle with the background pixel defined in the GC and then
to paint the text with the foreground pixel.
The upper-left corner of the filled rectangle is at:
[x, y - font-ascent]
The width is:
overall-width
The height is:
font-ascent + font-descent
The overall-width, font-ascent, and font-descent
are as would be returned by
_X_Q_u_e_r_y_T_e_x_t_E_x_t_e_n_t_s
using gc and string.
The function and fill-style defined in the GC are ignored for these functions.
The effective function is
_G_X_c_o_p_y,
and the effective fill-style is
_F_i_l_l_S_o_l_i_d.
For fonts defined with 2-byte matrix indexing
and used with
_X_D_r_a_w_I_m_a_g_e_S_t_r_i_n_g,
each byte is used as a byte2 with a byte1 of zero.
Both functions use these GC components:
plane-mask, foreground, background, font, subwindow-mode, clip-x-origin,
clip-y-origin, and clip-mask.
_X_D_r_a_w_I_m_a_g_e_S_t_r_i_n_g
and
_X_D_r_a_w_I_m_a_g_e_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
XDrawString(3X11),
XDrawText(3X11),
XLoadFont(3X11),
XTextExtents(3X11)
_X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e