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

NAME

6       XFillRectangle, XFillRectangles, XFillPolygon, XFillArc, XFillArcs -
7       fill rectangles, polygons, or arcs
8

SYNTAX

10       int XFillRectangle(Display *display, Drawable d, GC gc, int x, int y,
11              unsigned int width, unsigned int height);
12
13       int XFillRectangles(Display *display, Drawable d, GC gc, XRectangle
14              *rectangles, int nrectangles);
15
16       int XFillPolygon(Display *display, Drawable d, GC gc, XPoint *points,
17              int npoints, int shape, int mode);
18
19       int XFillArc(Display *display, Drawable d, GC gc, int x, int y,
20              unsigned int width, unsigned int height, int angle1, int
21              angle2);
22
23       int XFillArcs(Display *display, Drawable d, GC gc, XArc *arcs, int
24              narcs);
25

ARGUMENTS

27       angle1    Specifies the start of the arc relative to the three-o'clock
28                 position from the center, in units of degrees * 64.
29
30       angle2    Specifies the path and extent of the arc relative to the
31                 start of the arc, in units of degrees * 64.
32
33       arcs      Specifies an array of arcs.
34
35       d         Specifies the drawable.
36
37       display   Specifies the connection to the X server.
38
39       gc        Specifies the GC.
40
41       mode      Specifies the coordinate mode.  You can pass CoordModeOrigin
42                 or CoordModePrevious.
43
44       narcs     Specifies the number of arcs in the array.
45
46       npoints   Specifies the number of points in the array.
47
48       nrectangles
49                 Specifies the number of rectangles in the array.
50
51       points    Specifies an array of points.
52
53       rectangles
54                 Specifies an array of rectangles.
55
56       shape     Specifies a shape that helps the server to improve perfor‐
57                 mance.  You can pass Complex, Convex, or Nonconvex.
58
59
60       width
61       height    Specify the width and height, which are the dimensions of the
62                 rectangle to be filled or the major and minor axes of the
63                 arc.
64
65
66       x
67       y         Specify the x and y coordinates, which are relative to the
68                 origin of the drawable and specify the upper-left corner of
69                 the rectangle.
70

DESCRIPTION

72       The XFillRectangle and XFillRectangles functions fill the specified
73       rectangle or rectangles as if a four-point FillPolygon protocol request
74       were specified for each rectangle:
75
76       [x,y] [x+width,y] [x+width,y+height] [x,y+height]
77
78       Each function uses the x and y coordinates, width and height dimen‐
79       sions, and GC you specify.
80
81       XFillRectangles fills the rectangles in the order listed in the array.
82       For any given rectangle, XFillRectangle and XFillRectangles do not draw
83       a pixel more than once.  If rectangles intersect, the intersecting pix‐
84       els are drawn multiple times.
85
86       Both functions use these GC components: function, plane-mask, fill-
87       style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
88       They also use these GC mode-dependent components: foreground, back‐
89       ground, tile, stipple, tile-stipple-x-origin, and tile-stipple-y-ori‐
90       gin.
91
92       XFillRectangle and XFillRectangles can generate BadDrawable, BadGC, and
93       BadMatch errors.
94
95       XFillPolygon fills the region closed by the specified path.  The path
96       is closed automatically if the last point in the list does not coincide
97       with the first point.  XFillPolygon does not draw a pixel of the region
98       more than once.  CoordModeOrigin treats all coordinates as relative to
99       the origin, and CoordModePrevious treats all coordinates after the
100       first as relative to the previous point.
101
102       Depending on the specified shape, the following occurs:
103
104       ·    If shape is Complex, the path may self-intersect.  Note that con‐
105            tiguous coincident points in the path are not treated as self-
106            intersection.
107
108       ·    If shape is Convex, for every pair of points inside the polygon,
109            the line segment connecting them does not intersect the path.  If
110            known by the client, specifying Convex can improve performance.
111            If you specify Convex for a path that is not convex, the graphics
112            results are undefined.
113
114       ·    If shape is Nonconvex, the path does not self-intersect, but the
115            shape is not wholly convex.  If known by the client, specifying
116            Nonconvex instead of Complex may improve performance.  If you
117            specify Nonconvex for a self-intersecting path, the graphics
118            results are undefined.
119
120       The fill-rule of the GC controls the filling behavior of self-inter‐
121       secting polygons.
122
123       This function uses these GC components: function, plane-mask, fill-
124       style, fill-rule, subwindow-mode, clip-x-origin, clip-y-origin, and
125       clip-mask.  It also uses these GC mode-dependent components: fore‐
126       ground, background, tile, stipple, tile-stipple-x-origin, and tile-
127       stipple-y-origin.
128
129       XFillPolygon can generate BadDrawable, BadGC, BadMatch, and BadValue
130       errors.
131
132       For each arc, XFillArc or XFillArcs fills the region closed by the in‐
133       finitely thin path described by the specified arc and, depending on the
134       arc-mode specified in the GC, one or two line segments.  For ArcChord,
135       the single line segment joining the endpoints of the arc is used.  For
136       ArcPieSlice, the two line segments joining the endpoints of the arc
137       with the center point are used.  XFillArcs fills the arcs in the order
138       listed in the array.  For any given arc, XFillArc and XFillArcs do not
139       draw a pixel more than once.  If regions intersect, the intersecting
140       pixels are drawn multiple times.
141
142       Both functions use these GC components: function, plane-mask, fill-
143       style, arc-mode, subwindow-mode, clip-x-origin, clip-y-origin, and
144       clip-mask.  They also use these GC mode-dependent components: fore‐
145       ground, background, tile, stipple, tile-stipple-x-origin, and tile-
146       stipple-y-origin.
147
148       XFillArc and XFillArcs can generate BadDrawable, BadGC, and BadMatch
149       errors.
150

DIAGNOSTICS

152       BadDrawable
153                 A value for a Drawable argument does not name a defined Win‐
154                 dow or Pixmap.
155
156       BadGC     A value for a GContext argument does not name a defined GCon‐
157                 text.
158
159       BadMatch  An InputOnly window is used as a Drawable.
160
161       BadMatch  Some argument or pair of arguments has the correct type and
162                 range but fails to match in some other way required by the
163                 request.
164
165       BadValue  Some numeric value falls outside the range of values accepted
166                 by the request.  Unless a specific range is specified for an
167                 argument, the full range defined by the argument's type is
168                 accepted.  Any argument defined as a set of alternatives can
169                 generate this error.
170

SEE ALSO

172       XDrawArc(3), XDrawPoint(3), XDrawRectangle(3)
173       Xlib - C Language X Interface
174
175
176
177X Version 11                     libX11 1.3.4                XFillRectangle(3)
Impressum