Next Prev Up

6.5 Drawing Rectangles

The draw-rectangle and draw-rectangles functions draw hollow or filled outlines of the specified rectangle or rectangles as if a five-point polyline were specified for each rectangle, as follows:

[x,y,] [x+width,y] [x+width,y+height] [x,y+height] [x,y]

draw-rectangle and draw-rectangles use the following graphics context components: background, function, plane-mask, foreground, subwindow-mode, cap-style, clip-x, clip-y, clip-ordering, clip-region and clip-mask, dash-list, dash-offset, fill-style, join-style, line-width, line-style, stipple, tile, ts-x-origin, and ts-y-origin.


draw-rectangle drawable gcontext x y width height &optional fill-p Function
     
drawable
The destination drawable.
gcontext
The graphics context for drawing the rectangle.
x, y
The x and y coordinates that define the upper left corner of the rectangle. The coordinates are relative to the destination origin. Type is int16.
width, height
Specifies the width and height that define the outline of the rectangle. Type is card16.
fill-p
Specifies whether the rectangle is filled or not. Type boolean.

Draws a rectangle defined by the x, y, width , and height arguments.


draw-rectangles drawable gcontext rectangles &optional fill-p Function
     
drawable
The destination drawable.
gcontext
The graphics context.
rectangles
A list specifying the upper left corner x and y, width and height of the rectangles. Type is rect-seq.
fill-p
Specified if the rectangles are filled or not. Type is boolean.

Draws the rectangles in the order listed in rectangles. For the specified rectangle or rectangles, no pixel is drawn more than once. The x and y coordinates of each rectangle are relative to the destination origin and define the upper left corner of the rectangle. If rectangles intersect, the intersecting pixels are drawn multiple times.


Next Prev Up
© 1988, 1989 Texas Instruments Incorporated
Conversion to HTML made by Gilbert Baumann.
Last build: Tue Dec 16 23:30:42 1997