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

NAME

6       XDrawPoint, XDrawPoints, XPoint - draw points and points structure
7

SYNTAX

9       int XDrawPoint(Display *display, Drawable d, GC gc, int x, int y);
10
11       int  XDrawPoints(Display  *display,  Drawable d, GC gc, XPoint *points,
12              int npoints, int mode);
13

ARGUMENTS

15       d         Specifies the drawable.
16
17       display   Specifies the connection to the X server.
18
19       gc        Specifies the GC.
20
21       mode      Specifies the coordinate mode.  You can pass  CoordModeOrigin
22                 or CoordModePrevious.
23
24       npoints   Specifies the number of points in the array.
25
26       points    Specifies an array of points.
27
28       x
29       y         Specify  the  x  and  y  coordinates where you want the point
30                 drawn.
31

DESCRIPTION

33       The XDrawPoint function uses the foreground pixel and  function  compo‐
34       nents  of  the  GC  to draw a single point into the specified drawable;
35       XDrawPoints draws multiple points this way.  CoordModeOrigin treats all
36       coordinates as relative to the origin, and CoordModePrevious treats all
37       coordinates after the first as relative to the previous point.   XDraw‐
38       Points draws the points in the order listed in the array.
39
40       Both  functions  use  these  GC components: function, plane-mask, fore‐
41       ground, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
42
43       XDrawPoint  can  generate  BadDrawable,  BadGC,  and  BadMatch  errors.
44       XDrawPoints  can  generate  BadDrawable,  BadGC, BadMatch, and BadValue
45       errors.
46

STRUCTURES

48       The XPoint structure contains:
49
50       typedef struct {
51               short x, y;
52       } XPoint;
53
54       All x and y members are signed integers.  The width and height  members
55       are  16-bit  unsigned  integers.  You should be careful not to generate
56       coordinates and sizes out of the 16-bit ranges,  because  the  protocol
57       only has 16-bit fields for these values.
58

DIAGNOSTICS

60       BadDrawable
61                 A  value for a Drawable argument does not name a defined Win‐
62                 dow or Pixmap.
63
64       BadGC     A value for a GContext argument does not name a defined GCon‐
65                 text.
66
67       BadMatch  An InputOnly window is used as a Drawable.
68
69       BadMatch  Some  argument  or pair of arguments has the correct type and
70                 range but fails to match in some other way  required  by  the
71                 request.
72
73       BadValue  Some numeric value falls outside the range of values accepted
74                 by the request.  Unless a specific range is specified for  an
75                 argument,  the  full  range defined by the argument's type is
76                 accepted.  Any argument defined as a set of alternatives  can
77                 generate this error.
78

SEE ALSO

80       XDrawArc(3), XDrawLine(3), XDrawRectangle(3)
81       Xlib - C Language X Interface
82
83
84
85X Version 11                     libX11 1.6.12                   XDrawPoint(3)
Impressum