Add a clipping rectangle to the stack
int PtClipAdd( PtWidget_t *widget, PhRect_t *rect );
This function adds a clipping rectangle to the clipping stack. The rectangle added to the clipping stack is the intersection of the last rectangle on the stack and the provided rectangle rect.
Prior to entering a widget's Draw method, the canvas rectangle derived from the PtBasic-class level is pushed onto the clipping stack. This prevents any children from drawing beyond the canvas of the parent container.
A widget can, however, draw beyond its own canvas or extent unless additional clipping is performed. PtAttemptResize() and PtResizeCanvas() set the Pt_UCLIP bit of a widget's resize flags if the widget requires additional clipping (to prevent it from drawing beyond its own canvas).
The current level of stack clipping.
PtAttemptResize(), PtClipRemove(), PtResizeCanvas()
PhRect_t, PtCalcCanvas() in the Photon Library Reference