The suppression of graphics outside a pre-defined area is called clipping. Many Fastgraph functions provide clipping, either automatically or through a special version of the function.

Each virtual buffer has its own independent clipping limits, initially set to the entire virtual buffer. You can change the active virtual buffer's clipping limits with fg_setclip() when using screen space, or fg_setclipw() when using world space. Each function takes four parameters that specify the minimum x, the maximum x, the minimum y, and the maximum y coordinates of the rectangular clipping region. The parameters are integer quantities for fg_setclip() and floating point quantities for fg_setclipw(). For example, the statement

C/C++ and Delphi:


Visual Basic:

Call fg_setclip(0, 319, 0, 239)

would define the upper left quadrant of a 640x480 virtual buffer as the clipping region. The fg_getclip() function returns the current clipping limits, as defined in the most recent call to fg_setclip().

<< Prev

Next >>

Fastgraph Home Page


copyright 2001 Ted Gruber Software, Inc.