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

DIAGNOSTICS

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

SEE ALSO

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