sbox(3G)sbox(3G)NAME
sbox, sboxi, sboxs - draw a screen-aligned rectangle
C SPECIFICATION
void sbox(x1, y1, x2, y2)
Coord x1, y1, x2, y2;
void sboxi(x1, y1, x2, y2)
Icoord x1, y1, x2, y2;
void sboxs(x1, y1, x2, y2)
Scoord x1, y1, x2, y2;
All of the above functions are functionally the same except for the type
declarations of the parameters.
PARAMETERS
x1 expects the x coordinate of a corner of the box.
y1 expects the y coordinate of a corner of the box.
x2 expects the x coordinate of the opposite corner of the box.
y2 expects the y coordinate of the opposite corner of the box.
DESCRIPTION
sbox draws an unfilled, two-dimensional, screen-aligned rectangle. The
rectangle is drawn as a sequence of four line segments, and therefore
inherits many properties that affect the drawing of lines. These include
the current color, writemask, line width, stipple pattern, and subpixel
mode. The stipple pattern is initialized to bit zero of the current
linestyle before the rectangle is drawn, then shifted continuously
through the segments of the rectangle.
The sides of the rectangle will be parallel to the screen x and y axes.
This rectangle cannot be rotated. The z coordinate is set to zero.
When you use sbox, you must not use alpha blending, backfacing or
frontfacing, depthcueing, fog, gouraud shading, lighting, line
antialiasing, screen subdivision, stenciling, texture mapping, or z-
buffering.
sbox may be faster than rect on some machines. Use sbox when you need to
draw a large number of screen-aligned rectangles.
After sbox executes, the graphics position is undefined.
SEE ALSO
backface, bgnclosedline, blendfunction, deflinestyle, depthcue,
linewidth, linesmooth, lmbind, lsrepeat, rect, scrsubdivide,
setlinestyle, shademodel, stencil, subpixel, texbind, zbuffer
Page 1