Limit the extent of drawing
void PgSetClipping( unsigned short n,
                    PhRect_t const *rects );
This function lets you limit the extent of drawing by specifying which rectangles to draw in. Note that you can never draw outside of the current region.
The n argument contains the number of clip rectangles; rects contains an array of n clip rectangles, relative to the origin of the current region. To reset the clipping rectangle to the full size of the region, you should pass 0 rectangles.
All subsequent draws will be clipped to the intersection of the clipping rectangles set by PgSetClipping(), PgSetMultiClip(), and PgSetUserClip(), and PgSetRegion().
![]()  | 
PhAttach(),
  PhReattach(), and
  PgSetRegion()
  reset the clipping rectangle to the full size of the region.
 Don't call PgSetClipping() in a widget's draw function; use PtClipAdd() and PtClipRemove() instead. For more information, see the Building Custom Widgets guide.  | 
This function flushes the draw buffer.
Photon
| Safety: | |
|---|---|
| Interrupt handler | No | 
| Signal handler | No | 
| Thread | No | 
PgFlush(), PgSetMultiClip(), PgSetRegion(), PgSetUserClip(), PhAttach(), PhReattach()
PtClipAdd(), PtClipRemove() in the Building Custom Widgets guide.