PtSurfaceRect(), PtSurfaceRectById()

Get the bounding box of a control surface

Synopsis:

PhRect_t *PtSurfaceRect( PtSurface_t *surface,
                         PhRect_t *rect );

PhRect_t *PtSurfaceRectById( PtWidget_t *widget,
                             unsigned char surface_id,
                             PhRect_t *rect );

Library:

ph

Description:

These functions retrieve the bounding box of a control surface. They differ in the way they identify the control surface:

PtSurfaceRect()
Uses the surface argument, which points to a PtSurface_t structure that describes the control surface. This pointer must not be NULL.
PtSurfaceRectById()
Searches the control surfaces belonging to the widget for the one with an ID of surface_id.

Returns:

If rect is non-NULL, the result is copied there and the functions return rect. Otherwise, a pointer to the surface's internal data is returned.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

Caveats:

PtSurfaceRect() is a macro.

See also:

PhRect_t, PtCalcSurface(), PtCalcSurfaceByAction(), PtCalcSurfaceById(), PtSurfaceCalcBoundingBox(), PtSurfaceCalcBoundingBoxById(), PtSurfaceExtent(), PtSurfaceExtentById()

Control Surfaces chapter of the Photon Programmer's Guide