Caution: This version of this document is no longer maintained. For the latest documentation, see


A list of rectangles


typedef struct Ph_tile { 
    PhRect_t rect;
    struct Ph_tile *next;
    } PhTile_t;


The PhTile_t structure is used to build linked lists of rectangles. It includes at least the following members:

A PhRect_t structure that defines the rectangle.
A pointer to the next tile in the list.

Note: Photon maintains an internal pool of tiles because they're frequently used, and using a pool reduces the amount of time spent allocating and freeing the tiles. Use PhGetTile() to get a tile from the pool, and PhFreeTiles() to return a list of tiles to the pool.



See also:

PhAddMergeTiles(), PhClipTilings(), PhCoalesceTiles(), PhCopyTiles(), PhDeTranslateTiles(), PhFreeTiles(), PhGetTile(), PhIntersectTilings(), PhMergeTiles(), PhRectsToTiles(), PhSortTiles(), PhTilesToRects(), PhTranslateTiles(), PhRect_t

Geometry data types in the Working with Code chapter, and Using damage tiles in the Raw Drawing and Animation chapter of the Photon Programmer's Guide