Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

PtDamageExtent()

Mark an area of a widget as damaged so that it will be redrawn

Synopsis:

int PtDamageExtent( PtWidget_t *widget, 
                    PhRect_t const *extent );

Library:

ph

Description:

This function marks the specified widget as damaged and adds extent to the clipping list that will be used the next time the widget engine redraws this widget. The rectangle specified by the PhRect_t structure pointed to by extent is relative to the widget's origin.

All widgets in front of the damaged widget that intersect with extent will be redrawn. If the damaged widget's fill color is transparent, all widgets behind it that intersect extent will be redrawn. In all cases, the clipping will be set to extent.

The widget library takes care of updating widgets whenever resources are modified; you don't normally need to use this function unless you're using a PtRaw widget and want it to redraw and repair part or all of itself.

If you want the widget to be redrawn immediately, call PtFlush() after calling PtDamageExtent().

Returns:

0
Success.
-1
An error occurred. This function fails if the widget isn't a container and doesn't reside in a container, or if there isn't enough memory to expand the damage list.

Examples:

See PhBlit().

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PhRect_t, PtDamageWidget(), PtFlush()