PgSetUserClip(), PgSetUserClipAbsolute(), PgSetUserClipCx(), PgSetUserClipAbsoluteCx()

Restrict subsequent draws


void PgSetUserClip( PhRect_t const *ClipRect );

void PgSetUserClipAbsolute(
                      PhRect_t const *ClipRect );

void PgSetUserClipCx( PhGC_t *gc,
                      PhRect_t const *ClipRect );

void PgSetUserClipAbsoluteCx(
                      PhGC_t *gc,
                      PhRect_t const *ClipRect );




These functions restrict all subsequent draws to the area defined by the PhRect_t pointed to by ClipRect. To disable the user clipping rectangle, pass ClipRect as NULL.

PgSetUserClip*() sets the user clipping rectangle relative to the current translation whereas PgSetUserClipAbsolute*() sets the rectangle independent of the current translation.

The user clipping area is set independent of the clipping that's set by PgSetClipping*() and PgSetMultiClip*().

All subsequent draws will be clipped to the intersection of the clipping rectangles set by PgSetClipping*(), PgSetMultiClip*(), and PgSetUserClip*().

Unlike PgSetClipping*(), these functions don't flush the draw buffer.

Note: PhAttach(), PhReattach(), and PgSetRegion() reset the clipping rectangle to the full size of the region.

These functions emit a draw command.

PgSetUserClip() and PgSetUserClipAbsolute() work on the current graphics context, while you can specify the graphics context gc for PgSetUserClipCx() and PgSetUserClipAbsoluteCx().



Interrupt handler No
Signal handler No
Thread No

See also:

PgClearTranslation(), PgSetClipping(), PgSetMultiClip(), PgSetRegion(), PgSetTranslation(), PhAttach(), PhReattach(), PhRect_t