Solid RectanglesFastgraph includes functions for drawing solid rectangles, in both normal and "exclusive or" modes, with and without clipping. None of these functions affect the graphics cursor position. The fg_rect() function draws a solid rectangle in screen space, without clipping, using the current color. It requires four integer parameters that respectively define the minimum x, maximum x, minimum y, and maximum y screen space coordinates of the rectangle. The minimum coordinates must be less than or equal to the maximum coordinates, or else the results are unpredictable. The fg_clprect() function is identical in all respects to fg_rect(), except it observes the clipping limits. The fg_rectx() and fg_clprectx() functions are similar to fg_rect() and fg_clprect(), but they instead draw the rectangle in "exclusive or" mode. The resulting color of each pixel is computed by performing an exclusive or operation of the pixel's original color and the current color. The world space versions of the solid rectangle drawing functions are fg_rectw() and fg_clprectw(). Like fg_rect() and fg_clprect(), they require four parameters that define the extremes of the rectangle, but the parameters are floating point world space coordinates. There are no world space versions of the functions for drawing "exclusive or" rectangles, but we can apply the fg_xscreen() and fg_yscreen() functions to the world space coordinates and call the corresponding screen space functions.
|
 
copyright 2001 Ted Gruber Software, Inc.