1XDrawImageString(3)             XLIB FUNCTIONS             XDrawImageString(3)
2
3
4

NAME

6       XDrawImageString, XDrawImageString16 - draw image text
7

SYNTAX

9       int XDrawImageString(Display *display, Drawable d, GC gc, int x, int y,
10              char *string, int length);
11
12       int XDrawImageString16(Display *display, Drawable d, GC gc, int x, int
13              y, XChar2b *string, int length);
14

ARGUMENTS

16       d         Specifies the drawable.
17
18       display   Specifies the connection to the X server.
19
20       gc        Specifies the GC.
21
22       length    Specifies the number of characters in the string argument.
23
24       string    Specifies the character string.
25
26
27       x
28       y         Specify the x and y coordinates, which are relative to the
29                 origin of the specified drawable and define the origin of the
30                 first character.
31

DESCRIPTION

33       The XDrawImageString16 function is similar to XDrawImageString except
34       that it uses 2-byte or 16-bit characters.  Both functions also use both
35       the foreground and background pixels of the GC in the destination.
36
37       The effect is first to fill a destination rectangle with the background
38       pixel defined in the GC and then to paint the text with the foreground
39       pixel.  The upper-left corner of the filled rectangle is at:
40
41       [x, y - font-ascent]
42
43       The width is:
44
45       overall-width
46
47       The height is:
48
49       font-ascent + font-descent
50
51       The overall-width, font-ascent, and font-descent are as would be
52       returned by XQueryTextExtents using gc and string.  The function and
53       fill-style defined in the GC are ignored for these functions.  The
54       effective function is GXcopy, and the effective fill-style is Fill‐
55       Solid.
56
57       For fonts defined with 2-byte matrix indexing and used with XDrawIm‐
58       ageString, each byte is used as a byte2 with a byte1 of zero.
59
60       Both functions use these GC components: plane-mask, foreground, back‐
61       ground, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-
62       mask.
63
64       XDrawImageString and XDrawImageString16 can generate BadDrawable,
65       BadGC, and BadMatch errors.
66

DIAGNOSTICS

68       BadDrawable
69                 A value for a Drawable argument does not name a defined Win‐
70                 dow or Pixmap.
71
72       BadGC     A value for a GContext argument does not name a defined GCon‐
73                 text.
74
75       BadMatch  An InputOnly window is used as a Drawable.
76
77       BadMatch  Some argument or pair of arguments has the correct type and
78                 range but fails to match in some other way required by the
79                 request.
80

SEE ALSO

82       XDrawString(3), XDrawText(3), XLoadFont(3), XTextExtents(3)
83       Xlib - C Language X Interface
84
85
86
87X Version 11                     libX11 1.3.4              XDrawImageString(3)
Impressum