Functions | |
void | fltk::clipout (const Rectangle &) |
int | fltk::intersect_with_clip (Rectangle &) |
bool | fltk::not_clipped (const Rectangle &) |
void | fltk::pop_clip () |
void | fltk::push_clip (const Rectangle &) |
void | fltk::push_no_clip () |
When drawing you can also test the current clip region with fltk::not_clipped() and fltk::clip_box(). By using these to skip over complex drawings that are clipped you can greatly speed up your program's redisplay.
The width and height of the clipping region is measured in transformed coordianates.
|
Pushes the intersection of the current region and rectangle onto the clip stack. |
|
Remove rectangle from the current clip region, thus making it a more complex shape. This does not push the stack, it just replaces the top of it. Some graphics backends (OpenGL and Cairo, at least) do not support non-rectangular clip regions. This call does nothing on those. |
|
Restore the previous clip region. You must call fltk::pop_clip() exactly once for every time you call fltk::push_clip(). If you return to FLTK with the clip stack not empty unpredictable results occur. |
|
Pushes an empty clip region on the stack so nothing will be clipped. This lets you draw outside the current clip region. This should only be used to temporarily ignore the clip region to draw into an offscreen area. |
|
Returns true if any or all of rectangle is inside the clip region. |
|
Intersect a transform()'d rectangle with the current clip region and change it to the smaller rectangle that surrounds (and probably equals) this intersection area. This can be used by device-specific drawing code to limit complex pixel operations (like drawing images) to the smallest rectangle needed to update the visible area. Return values:
|