Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xfillrectab(3) [hpux man page]

XFillRectangles()														 XFillRectangles()

Name
  XFillRectangles - fill multiple rectangular areas.

Synopsis
  XFillRectangles(display, drawable, gc, rectangles, nrectangles)
	Display *display;
	Drawable drawable;
	GC gc;
	XRectangle *rectangles;
	int nrectangles;

Arguments
  display   Specifies a connection to an X server; returned from XOpenDisplay().

  drawable  Specifies the drawable.

  gc	    Specifies the graphics context.

  rectangles
	    Specifies a pointer to an array of rectangles.

  nrectangles
	    Specifies the number of rectangles in the array.

Description
  XFillRectangles() fills multiple rectangular areas in the specified drawable using the graphics context.

  The  x  and  y coordinates of each rectangle are relative to the drawable's origin, and define the upper left corner of the rectangle.  The
  rectangles are drawn in the order listed.  For any given rectangle, no pixel is drawn more than once.  If rectangles intersect, the  inter-
  secting pixels will be drawn multiple times.

  In R4 and earlier there is a limit to the number of rectangles that can be drawn in a single call, based on the maximum request size, which
  varies according to the server.  In R5, Xlib chops your call into as many protocol requests as required.  To determine how many  rectangles
  you  can  draw  in  a single call in R4, find out your server's maximum request size using XMaxRequestSize().  Subtract three and divide by
  two, and this is the maximum number of rectangles you can fill in a single XDrawRectangles() call.

  XFillRectangles() uses these graphics  context  components:	function,  plane_mask,	fill_style,  subwindow_mode,  clip_x_origin,  clip_y_
  origin,  and	clip_ mask.  This function also uses these graphics context components depending on the fill_ style:  foreground, background,
  tile, stipple, ts_x_origin, and ts_y_ origin.

  For more information, see Volume One, Chapter 6, Drawing Graphics and Text, and Chapter 5, The Graphics Context.

Structures
     typedef struct {
	 short x, y;
	 unsigned short width, height;
     } XRectangle;

Errors
  BadDrawable
  BadGC
  BadMatch

See Also
  XClearArea(), XClearWindow(), XCopyArea(), XCopyPlane(), XDraw, XDrawArc(), XDrawArcs(), XDrawFilled(), XDrawLine(),	XDrawLines(),  XDraw-
  Point(),  XDrawPoints(),  XDrawRectangle(),  XDrawRectangles(), XDrawSegments(), XFillArc(), XFillArcs(), XFillPolygon(), XFillRectangle(),
  XFillRectangles().

Xlib - Drawing Primitives													 XFillRectangles()

Check Out this Related Man Page

XDrawRectangle(3X11)						  XLIB FUNCTIONS					      XDrawRectangle(3X11)

NAME
XDrawRectangle, XDrawRectangles, XRectangle - draw rectangles and rectangles structure SYNTAX
XDrawRectangle(display, d, gc, x, y, width, height) Display *display; Drawable d; GC gc; int x, y; unsigned int width, height; XDrawRectangles(display, d, gc, rectangles, nrectangles) Display *display; Drawable d; GC gc; XRectangle rectangles[]; int nrectangles; ARGUMENTS
d Specifies the drawable. display Specifies the connection to the X server. gc Specifies the GC. nrectangles Specifies the number of rectangles in the array. rectangles Specifies an array of rectangles. width height Specify the width and height, which specify the dimensions of the rectangle. x y Specify the x and y coordinates, which specify the upper-left corner of the rectangle. DESCRIPTION
The XDrawRectangle and XDrawRectangles functions draw the outlines of the specified rectangle or rectangles as if a five-point PolyLine protocol request were specified for each rectangle: [x,y] [x+width,y] [x+width,y+height] [x,y+height] [x,y] For the specified rectangle or rectangles, these functions do not draw a pixel more than once. XDrawRectangles draws the rectangles in the order listed in the array. If rectangles intersect, the intersecting pixels are drawn multiple times. Both functions use these GC components: function, plane-mask, line-width, line-style, cap-style, join-style, fill-style, 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, tile-stipple-y-origin, dash-offset, and dash-list. XDrawRectangle and XDrawRectangles can generate BadDrawable, BadGC, and BadMatch errors. STRUCTURES
The XRectangle structure contains: typedef struct { short x, y; unsigned short width, height; } XRectangle; All x and y members are signed integers. The width and height members are 16-bit unsigned integers. You should be careful not to generate coordinates and sizes out of the 16-bit ranges, because the protocol only has 16-bit fields for these values. DIAGNOSTICS
BadDrawable A value for a Drawable argument does not name a defined Window or Pixmap. BadGC A value for a GContext argument does not name a defined GContext. BadMatch An InputOnly window is used as a Drawable. BadMatch Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request. SEE ALSO
XDrawArc(3X11), XDrawLine(3X11), XDrawPoint(3X11) Xlib - C Language X Interface X Version 11 Release 6.6 XDrawRectangle(3X11)
Man Page