1XFillRectangle(3) XLIB FUNCTIONS XFillRectangle(3)
2
3
4
6 XFillRectangle, XFillRectangles, XFillPolygon, XFillArc, XFillArcs -
7 fill rectangles, polygons, or arcs
8
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
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 width
60 height Specify the width and height, which are the dimensions of the
61 rectangle to be filled or the major and minor axes of the
62 arc.
63
64 x
65 y Specify the x and y coordinates, which are relative to the
66 origin of the drawable and specify the upper-left corner of
67 the rectangle.
68
70 The XFillRectangle and XFillRectangles functions fill the specified
71 rectangle or rectangles as if a four-point FillPolygon protocol request
72 were specified for each rectangle:
73
74 [x,y] [x+width,y] [x+width,y+height] [x,y+height]
75
76 Each function uses the x and y coordinates, width and height dimen‐
77 sions, and GC you specify.
78
79 XFillRectangles fills the rectangles in the order listed in the array.
80 For any given rectangle, XFillRectangle and XFillRectangles do not draw
81 a pixel more than once. If rectangles intersect, the intersecting pix‐
82 els are drawn multiple times.
83
84 Both functions use these GC components: function, plane-mask, fill-
85 style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
86 They also use these GC mode-dependent components: foreground, back‐
87 ground, tile, stipple, tile-stipple-x-origin, and tile-stipple-y-ori‐
88 gin.
89
90 XFillRectangle and XFillRectangles can generate BadDrawable, BadGC, and
91 BadMatch errors.
92
93 XFillPolygon fills the region closed by the specified path. The path
94 is closed automatically if the last point in the list does not coincide
95 with the first point. XFillPolygon does not draw a pixel of the region
96 more than once. CoordModeOrigin treats all coordinates as relative to
97 the origin, and CoordModePrevious treats all coordinates after the
98 first as relative to the previous point.
99
100 Depending on the specified shape, the following occurs:
101
102 · If shape is Complex, the path may self-intersect. Note that con‐
103 tiguous coincident points in the path are not treated as self-
104 intersection.
105
106 · If shape is Convex, for every pair of points inside the polygon,
107 the line segment connecting them does not intersect the path. If
108 known by the client, specifying Convex can improve performance.
109 If you specify Convex for a path that is not convex, the graphics
110 results are undefined.
111
112 · If shape is Nonconvex, the path does not self-intersect, but the
113 shape is not wholly convex. If known by the client, specifying
114 Nonconvex instead of Complex may improve performance. If you
115 specify Nonconvex for a self-intersecting path, the graphics
116 results are undefined.
117
118 The fill-rule of the GC controls the filling behavior of self-inter‐
119 secting polygons.
120
121 This function uses these GC components: function, plane-mask, fill-
122 style, fill-rule, subwindow-mode, clip-x-origin, clip-y-origin, and
123 clip-mask. It also uses these GC mode-dependent components: fore‐
124 ground, background, tile, stipple, tile-stipple-x-origin, and tile-
125 stipple-y-origin.
126
127 XFillPolygon can generate BadDrawable, BadGC, BadMatch, and BadValue
128 errors.
129
130 For each arc, XFillArc or XFillArcs fills the region closed by the in‐
131 finitely thin path described by the specified arc and, depending on the
132 arc-mode specified in the GC, one or two line segments. For ArcChord,
133 the single line segment joining the endpoints of the arc is used. For
134 ArcPieSlice, the two line segments joining the endpoints of the arc
135 with the center point are used. XFillArcs fills the arcs in the order
136 listed in the array. For any given arc, XFillArc and XFillArcs do not
137 draw a pixel more than once. If regions intersect, the intersecting
138 pixels are drawn multiple times.
139
140 Both functions use these GC components: function, plane-mask, fill-
141 style, arc-mode, subwindow-mode, clip-x-origin, clip-y-origin, and
142 clip-mask. They also use these GC mode-dependent components: fore‐
143 ground, background, tile, stipple, tile-stipple-x-origin, and tile-
144 stipple-y-origin.
145
146 XFillArc and XFillArcs can generate BadDrawable, BadGC, and BadMatch
147 errors.
148
150 BadDrawable
151 A value for a Drawable argument does not name a defined Win‐
152 dow or Pixmap.
153
154 BadGC A value for a GContext argument does not name a defined GCon‐
155 text.
156
157 BadMatch An InputOnly window is used as a Drawable.
158
159 BadMatch Some argument or pair of arguments has the correct type and
160 range but fails to match in some other way required by the
161 request.
162
163 BadValue Some numeric value falls outside the range of values accepted
164 by the request. Unless a specific range is specified for an
165 argument, the full range defined by the argument's type is
166 accepted. Any argument defined as a set of alternatives can
167 generate this error.
168
170 XDrawArc(3), XDrawPoint(3), XDrawRectangle(3)
171 Xlib - C Language X Interface
172
173
174
175X Version 11 libX11 1.6.7 XFillRectangle(3)