[Previous] [Contents] [Index] [Next]

PfExtentComponents()

Calculate the extent of a text string and invoke a callback

Synopsis:

#include <photon/Pf.h>

PhRect_t *PfExtentComponents( 
              PhRect_t *extent, 
              PhPoint_t const *pos, 
              const char *font,
              const char *str, 
              int len,
              void (*func)(PhRect_t *, 
                           const char *, 
                           const char *, int) );

Description:

This function calculates the extent of a text string as per PfExtentText(), and also invokes a user callback function func for each component of the string (a run of characters sourced from a single font).

This facility is used by the phrelay utility to determine which font files have to be downloaded to the remote system in order to correctly render a string.

The callback function is passed an extent rectangle, the filename of the font required, and the string and length of the character run.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PfExtentText()


[Previous] [Contents] [Index] [Next]