NAME
XDrawImageString — draw 8-bit image text characters.
SYNOPSIS
XDrawImageString(display, drawable, gc, x, y, string, length) Display ∗display; Drawable drawable; GC gc; int x, y; char ∗string; int length;
ARGUMENTS
displaySpecifies a connection to an X server; returned from XOpenDisplay().
drawableSpecifies the drawable.
gcSpecifies the graphics context.
x
ySpecify the x and y coordinates of the baseline starting position for the image text character, relative to the origin of the specified drawable.
stringSpecifies the character string.
lengthSpecifies the number of characters in the string argument.
DESCRIPTION
XDrawImageString draws a string, but unlike XDrawString() it draws both the foreground and the background of the characters. It draws the characters in the foreground and fills the bounding box with the background.
XDrawImageString() uses these graphics context components: plane_mask, foreground, background, font, subwindow_mode, clip_x_origin, clip_y_ origin, and clip_mask. The function and fill_style defined in gc are ignored; the effective function is GXcopy and the effective fill_style is FillSolid.
XDrawImageString() first fills a destination rectangle with the background pixel defined in gc, and then paints 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 and the height is ascent + descent, where overall->width, ascent, and descent are as would be returned by XQueryTextExtents() using gc and string.
For fonts defined with 2-byte matrix indexing and used with XDrawImageString(), each byte is used as a byte2 with a byte1 of zero. For more information, see Volume One, Chapter 6, Drawing Graphics and Text, and Chapter 5, The Graphics Context.
ERRORS
BadDrawable
BadGC
BadMatch
SEE ALSO
XDrawImageString16(), XDrawString(), XDrawString16(), XDrawText(), XDrawText16(), XQueryTextExtents(), XQueryTextExtents16(), XTextExtents(), XTextExtents16(), XTextWidth(), XTextWidth16().
Xlib Reference Manual