Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XDrRect(3X) — AOS 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XDrawArc(3X)

XDrawLine(3X)

XDrawPoint(3X)

XDrawRectangle(3X)  —  X Version 11

NAME

XDrawRectangle, XDrawRectangles − draw rectyangles

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

dSpecifies the drawable. 

displaySpecifies the connection to the X server. 

gcSpecifies the graphics context. 

nrectanglesSpecifies the number of rectangles in the array. 

rectanglesSpecifies a pointer to an array of rectangles. 

width

heightSpecify the width and height that define the outline of the rectangle. 

x

ySpecify the x and y coordinates that define 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 were specified for each rectangle:

[x,y,] [x+width,y] [x+width,y+height] [x,y+height] [x,y] .PN XDrawRectangle and .PN XDrawRectangles can generate BadDrawable, BadGC, and BadMatch errors.

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(3X), XDrawLine(3X), XDrawPoint(3X)
Xlib − C Language X Interface

1 March 1988

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026