XFillRectangle(3X11) AIX (XLIB FUNCTIONS) XFillRectangle(3X11) NAME XFillRectangle, XFillRectangles, XFillPolygon, XFillArc, XFillArcs - fill rectangles, polygons, or arcs SYNTAX XFillRectangle(_d_i_s_p_l_a_y, _d, _g_c, _x, _y, _w_i_d_t_h, _h_e_i_g_h_t) Display *_d_i_s_p_l_a_y; Drawable _d; GC _g_c; int _x, _y; unsigned int _w_i_d_t_h, _h_e_i_g_h_t; XFillRectangles(_d_i_s_p_l_a_y, _d, _g_c, _r_e_c_t_a_n_g_l_e_s, _n_r_e_c_t_a_n_g_l_e_s) Display *_d_i_s_p_l_a_y; Drawable _d; GC _g_c; XRectangle *_r_e_c_t_a_n_g_l_e_s; int _n_r_e_c_t_a_n_g_l_e_s; XFillPolygon(_d_i_s_p_l_a_y, _d, _g_c, _p_o_i_n_t_s, _n_p_o_i_n_t_s, _s_h_a_p_e, _m_o_d_e) Display *_d_i_s_p_l_a_y; Drawable _d; GC _g_c; XPoint *_p_o_i_n_t_s; int _n_p_o_i_n_t_s; int _s_h_a_p_e; int _m_o_d_e; XFillArc(_d_i_s_p_l_a_y, _d, _g_c, _x, _y, _w_i_d_t_h, _h_e_i_g_h_t, _a_n_g_l_e_1, _a_n_g_l_e_2) Display *_d_i_s_p_l_a_y; Drawable _d; GC _g_c; int _x, _y; unsigned int _w_i_d_t_h, _h_e_i_g_h_t; int _a_n_g_l_e_1, _a_n_g_l_e_2; XFillArcs(_d_i_s_p_l_a_y, _d, _g_c, _a_r_c_s, _n_a_r_c_s) Display *_d_i_s_p_l_a_y; Drawable _d; GC _g_c; XArc *_a_r_c_s; int _n_a_r_c_s; ARGUMENTS _a_n_g_l_e_1 Specifies the start of the arc relative to the three-o'clock position from the center, in units of degrees * 64. _a_n_g_l_e_2 Specifies the path and extent of the arc relative to the start of the arc, in units of degrees * 64. _a_r_c_s Specifies an array of arcs. Rev. Release 5 Page 1 XFillRectangle(3X11) AIX (XLIB FUNCTIONS) XFillRectangle(3X11) _d Specifies the drawable. _d_i_s_p_l_a_y Specifies the connection to the X server. _g_c Specifies the GC. _m_o_d_e Specifies the coordinate mode. You can pass _C_o_o_r_d_- _M_o_d_e_O_r_i_g_i_n or _C_o_o_r_d_M_o_d_e_P_r_e_v_i_o_u_s. _n_a_r_c_s Specifies the number of arcs in the array. _n_p_o_i_n_t_s Specifies the number of points in the array. _n_r_e_c_t_a_n_g_l_e_s Specifies the number of rectangles in the array. _p_o_i_n_t_s Specifies an array of points. _r_e_c_t_a_n_g_l_e_s Specifies an array of rectangles. _s_h_a_p_e Specifies a shape that helps the server to improve performance. You can pass _C_o_m_p_l_e_x, _C_o_n_v_e_x, or _N_o_n_c_o_n_v_e_x. _w_i_d_t_h _h_e_i_g_h_t Specify the width and height, which are the dimen- sions of the rectangle to be filled or the major and minor axes of the arc. _x _y Specify the x and y coordinates, which are rela- tive to the origin of the drawable and specify the upper-left corner of the rectangle. DESCRIPTION The _X_F_i_l_l_R_e_c_t_a_n_g_l_e and _X_F_i_l_l_R_e_c_t_a_n_g_l_e_s functions fill the specified rectangle or rectangles as if a four-point _F_i_l_l_P_o_- _l_y_g_o_n protocol request were specified for each rectangle: [x,y] [x+width,y] [x+width,y+height] [x,y+height] Each function uses the x and y coordinates, width and height dimensions, and GC you specify. _X_F_i_l_l_R_e_c_t_a_n_g_l_e_s fills the rectangles in the order listed in the array. For any given rectangle, _X_F_i_l_l_R_e_c_t_a_n_g_l_e and _X_F_i_l_l_R_e_c_t_a_n_g_l_e_s do not draw a pixel more than once. If rec- tangles intersect, the intersecting pixels are drawn multi- ple times. Both functions use these GC components: function, plane- mask, fill-style, subwindow-mode, clip-x-origin, clip-y- Rev. Release 5 Page 2 XFillRectangle(3X11) AIX (XLIB FUNCTIONS) XFillRectangle(3X11) origin, and clip-mask. They also use these GC mode- dependent components: foreground, background, tile, stipple, tile-stipple-x-origin, and tile-stipple-y-origin. _X_F_i_l_l_R_e_c_t_a_n_g_l_e and _X_F_i_l_l_R_e_c_t_a_n_g_l_e_s can generate _B_a_d_D_r_a_w_a_b_l_e, _B_a_d_G_C, and _B_a_d_M_a_t_c_h errors. _X_F_i_l_l_P_o_l_y_g_o_n fills the region closed by the specified path. The path is closed automatically if the last point in the list does not coincide with the first point. _X_F_i_l_l_P_o_l_y_g_o_n does not draw a pixel of the region more than once. _C_o_o_r_d_- _M_o_d_e_O_r_i_g_i_n treats all coordinates as relative to the origin, and _C_o_o_r_d_M_o_d_e_P_r_e_v_i_o_u_s treats all coordinates after the first as relative to the previous point. Depending on the specified shape, the following occurs: o+ If shape is _C_o_m_p_l_e_x, the path may self-intersect. Note that contiguous coincident points in the path are not treated as self-intersection. o+ If shape is _C_o_n_v_e_x, for every pair of points inside the polygon, the line segment connecting them does not intersect the path. If known by the client, specifying _C_o_n_v_e_x can improve performance. If you specify _C_o_n_v_e_x for a path that is not convex, the graphics results are undefined. o+ If shape is _N_o_n_c_o_n_v_e_x, the path does not self- intersect, but the shape is not wholly convex. If known by the client, specifying _N_o_n_c_o_n_v_e_x instead of _C_o_m_p_l_e_x may improve performance. If you specify _N_o_n_c_o_n_v_e_x for a self-intersecting path, the graphics results are unde- fined. The fill-rule of the GC controls the filling behavior of self-intersecting polygons. This function uses these GC components: function, plane- mask, fill-style, fill-rule, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. It also uses these GC mode- dependent components: foreground, background, tile, stipple, tile-stipple-x-origin, and tile-stipple-y-origin. _X_F_i_l_l_P_o_l_y_g_o_n can generate _B_a_d_D_r_a_w_a_b_l_e, _B_a_d_G_C, _B_a_d_M_a_t_c_h, and _B_a_d_V_a_l_u_e errors. For each arc, _X_F_i_l_l_A_r_c or _X_F_i_l_l_A_r_c_s fills the region closed by the infinitely thin path described by the specified arc and, depending on the arc-mode specified in the GC, one or two line segments. For _A_r_c_C_h_o_r_d, the single line segment joining the endpoints of the arc is used. For _A_r_c_P_i_e_S_l_i_c_e, the two line segments joining the endpoints of the arc with Rev. Release 5 Page 3 XFillRectangle(3X11) AIX (XLIB FUNCTIONS) XFillRectangle(3X11) the center point are used. _X_F_i_l_l_A_r_c_s fills the arcs in the order listed in the array. For any given arc, _X_F_i_l_l_A_r_c and _X_F_i_l_l_A_r_c_s do not draw a pixel more than once. If regions intersect, the intersecting pixels are drawn multiple times. Both functions use these GC components: function, plane- mask, fill-style, arc-mode, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. They also use these GC mode- dependent components: foreground, background, tile, stipple, tile-stipple-x-origin, and tile-stipple-y-origin. _X_F_i_l_l_A_r_c and _X_F_i_l_l_A_r_c_s can generate _B_a_d_D_r_a_w_a_b_l_e, _B_a_d_G_C, and _B_a_d_M_a_t_c_h errors. DIAGNOSTICS _B_a_d_D_r_a_w_a_b_l_e A value for a Drawable argument does not name a defined Window or Pixmap. _B_a_d_G_C A value for a GContext argument does not name a defined GContext. _B_a_d_M_a_t_c_h An _I_n_p_u_t_O_n_l_y window is used as a Drawable. _B_a_d_M_a_t_c_h Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request. _B_a_d_V_a_l_u_e Some numeric value falls outside the range of values accepted by the request. Unless a specific range is specified for an argument, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can gen- erate this error. SEE ALSO XDrawArc(3X11), XDrawPoint(3X11), XDrawRectangle(3X11) _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e Rev. Release 5 Page 4