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

PtCalcCanvas()

Calculate the drawable canvas for a widget

Synopsis:

PhRect_t *PtCalcCanvas( PtWidget_t *widget,
                        PhRect_t *canvas_rect);

Library:

ph

Description:

This function determines the canvas rectangle for the specified widget and caches it in the widget's internal memory. This canvas rectangle describes the area inside the widget's border and any margins.

If canvas_rect isn't NULL, PtCalcCanvas() copies the canvas rectangle into the PhRect_t structure it points to.

Returns:

A pointer to the PhRect_t structure that defines the canvas. If canvas_rect is non-NULL, this is the same pointer as canvas_rect.


Caution: If you pass NULL for canvas_rect, PtCalcCanvas() returns a pointer into the widget's internal memory. Don't modify the contents of the structure or free the memory.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PhRect_t, PtWidgetExtent()