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, un‐
20              signed int width, unsigned int height, int angle1, int angle2);
21
22       int XFillArcs(Display *display, Drawable d,  GC  gc,  XArc  *arcs,  int
23              narcs);
24

ARGUMENTS

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

DESCRIPTION

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

DIAGNOSTICS

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

SEE ALSO

169       XDrawArc(3), XDrawPoint(3), XDrawRectangle(3)
170       Xlib - C Language X Interface
171
172
173
174X Version 11                     libX11 1.8.7                XFillRectangle(3)
Impressum