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       x
27       y         Specify the x and y coordinates, which are relative to the
28                 origin of the specified drawable and define the origin of the
29                 first character.
30

DESCRIPTION

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

DIAGNOSTICS

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

SEE ALSO

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