Calculate the extent of a text string and invoke a callback
#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) );
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.
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |