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

NAME

6       XDrawString, XDrawString16 - draw text characters
7

SYNTAX

9       int XDrawString(Display *display, Drawable d, GC gc, int x, int y, char
10              *string, int length);
11
12       int XDrawString16(Display *display, Drawable d, GC gc, int x, int y,
13              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       Each character image, as defined by the font in the GC, is treated as
34       an additional mask for a fill operation on the drawable.  The drawable
35       is modified only where the font character has a bit set to 1.  For
36       fonts defined with 2-byte matrix indexing and used with XDrawString16,
37       each byte is used as a byte2 with a byte1 of zero.
38
39       Both functions use these GC components: function, plane-mask, fill-
40       style, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-
41       mask.  They also use these GC mode-dependent components: foreground,
42       background, tile, stipple, tile-stipple-x-origin, and tile-stipple-y-
43       origin.
44
45       XDrawString and XDrawString16 can generate BadDrawable, BadGC, and Bad‐
46       Match errors.
47

DIAGNOSTICS

49       BadDrawable
50                 A value for a Drawable argument does not name a defined Win‐
51                 dow or Pixmap.
52
53       BadGC     A value for a GContext argument does not name a defined GCon‐
54                 text.
55
56       BadMatch  An InputOnly window is used as a Drawable.
57
58       BadMatch  Some argument or pair of arguments has the correct type and
59                 range but fails to match in some other way required by the
60                 request.
61

SEE ALSO

63       XDrawImageString(3), XDrawText(3), XLoadFont(3)
64       Xlib - C Language X Interface
65
66
67
68X Version 11                     libX11 1.3.4                   XDrawString(3)
Impressum