Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptcalcsurfacebyid.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptcalcsurfacebyid.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptcalcsurfacebyid.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptcalcsurfacebyid.html on line 8

PtCalcSurfaceById()

Force the control surface with a given ID to calculate its geometry

Synopsis:

PtSurface_t *PtCalcSurfaceById(
                PtWidget_t *widget,
                unsigned char surface_id );

Library:

ph

Description:

PtCalcSurfaceById() forces a control surface to calculate its geometry.

The widget argument specifies the widget owning the surface, while surface_id specifies the numeric ID of the surface to calculate. This function is useful if the geometry of one surface depends on that of another.


Note: This function call amounts to a no-op if the geometry for the specified surface has already been calculated for this pre/post-extent cycle.

Returns:

A pointer to the specified surface on success, or NULL if the surface couldn't be found.


Note: Since control surfaces are maintained internally as an array, it's not uncommon for them to shift around in memory as surfaces are added and removed, thereby possibly invalidating a pointer returned by this function. As such, all surface pointers should be regarded as transient, and you should retrieve an updated copy whenever there is a chance that the widget's surface configuration might have changed.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtCalcSurface(), PtCalcSurfaceByAction(), PtSurfaceCalcBoundingBox(), PtSurfaceCalcBoundingBoxById(), PtSurfaceExtent(), PtSurfaceExtentById(), PtSurfaceRect(), PtSurfaceRectById()

Control Surfaces chapter of the Photon Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptcalcsurfacebyid.html on line 134

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptcalcsurfacebyid.html on line 134