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/pf/pfextentcomponents.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/pf/pfextentcomponents.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/pf/pfextentcomponents.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/pf/pfextentcomponents.html on line 8
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) );
#include <font_api.h>
pf_rect_t* PfExtentComponentsCx(
struct _Pf_ctrl *context,
pf_rect_t *extent,
pf_point_t const *pos,
const char *font,
const char *string,
int len,
void(*func)
(pf_rect_t const *,
const char *,
const char *,
int) );
- context
- (PfExtentComponentsCx() only) A pointer to the font context to use, returned by PfAttachCx() or PfAttachDllCx().
- extent
- A pointer to a
PhRect_t
structure where the function stores the string's extent.
For the interpretation of the members of this structure, see
PfExtentText().
- pos
- NULL, or a pointer to a
PhPoint_t
structure that defines an offset that you want to apply to the extent.
- font
- The base font to use when calculating the extent.
You should create this argument by calling
PfGenerateFontName() or PfGenerateFontNameCx().
- str
- The UTF-8 multibyte string whose extent you want to determine.
- len
- The number of bytes in the string.
If len is 0, the function assumes that it's
strlen(str).
- func
- A function that you want to call for each component of the string.
The callback function is passed an extent rectangle, the filename of
the font required, and the string and length of the character run.
- PfExtentComponents()
- ph
- PfExtentComponentsCx()
- font
These functions calculate the extent of a text string as per
PfExtentText(),
and also invoke 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
phrelay
(see the QNX Neutrino Utilities Reference)
to determine
which font files have to be downloaded to the remote system in order
to correctly render a string.
Photon
PfExtentComponents()
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
PfExtentComponentsCx()
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
PfExtent(),
PfExtentCx(),
PfExtentText(),
PfExtentTextToRect(),
PfGenerateFontName(),
PfGenerateFontNameCx(),
PhPoint_t,
PhRect_t
Fonts
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/pf/pfextentcomponents.html on line 201
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/pf/pfextentcomponents.html on line 201