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/pfextent16dot16cx.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/pfextent16dot16cx.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/pfextent16dot16cx.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/pfextent16dot16cx.html on line 8
Calculate the 16.16 fixed point extent rectangle of a text string
#include <font_api.h>
int PfExtent16dot16Cx( struct _Pf_ctrl *context,
pf_rect_16dot16_t *extent,
pf_point_16dot16_t const *pos,
const char *font,
long adata,
long bdata,
const char *str,
int len,
int flags,
pf_rect_t const *clip );
- context
- A pointer to the font context to use,
returned by PfAttachCx() or PfAttachDllCx().
- extent
- A pointer to a
pf_rect_16dot16_t
structure where the function stores the calculated 16.16 fixed poiint extent.
The members are:
- ul.x_16dot16
- the left bearing.
- lr.x_16dot16
- the maximum x distance.
- ul.y_16dot16
- the ascender.
- lr.y_16dot16
- the descender.
- pos
- A pointer to a
pf_point_16dot16_t
structure that specifies an offset to apply to the extent.
If pos is NULL, no offset is applied.
- font
- The base font, which you should create by calling
PfGenerateFontName().
- adata
- The horizontal fractional point size, if you set
PF_FRACTIONAL in the flags argument.
- bdata
- The vertical fractional point size, if you set
PF_FRACTIONAL in the flags argument.
- str
- The string whose extent you want to calculate.
The string is a UTF-8 multibyte one by default.
- len
- The length of the string, str, in bytes.
If len is 0, the function uses strlen(str).
- flags
- Flags that affect the behavior of the function. You can set up to one of the following to indicate the format of
the string:
- PF_WIDE_CHARS — the string is composed of 16-bit
wide characters.
If you set this flag, the function assumes that each character is
represented by 2 bytes that conform to the ISO/IEC 10646-1 UCS-2
double-byte format.
- PF_WIDE_CHAR32 — the string is composed of 32-bit
wide characters.
If you set this flag, the function assumes that each character is
represented by 4 bytes that conform to the ISO/IEC 10646-1 UCS-4
four-byte format.
|
Although this flag allows for 32-bit wide characters, the underlying font
system currently supports only characters up to Unicode U+FFFE.
|
If you don't set either of the above, the function assumes that the
string is composed of UTF-8 multibyte characters.
You can OR in any of these flags:
- PF_FRACTIONAL — use a fractional 16.16 point size.
If you set this flag, use the adata argument to specify the
horizontal fractional point size, and bdata to specify the
vertical fractional point size.
- PF_RECT — make the function behave like
PfExtentTextToRect().
If you set this flag, use the clip argument to specify the
rectangle to extent within.
If successful, the function returns the number of characters that fit
within the rectangle.
- clip
- A pointer to a pf_rect_t structure that's a suggested
clipping rectangle for the font manager to abide by.
- PfExtentCx()
- font
This function calculates the 16.16 fixed point extent rectangle of a text string. The 16.16
fixed point return value describes the extent with much greater accuracy than the extent pixel values.
The base font determines the ascender and descender values of the extent.
The width depends on the string; the actual
font used by characters within the string may differ from this
base font (as specified in the fontext and fontmap files).
The difference between PfExtent16dot16() and PfExtent16dot16Cx() is
that PfExtent16dot16Cx() lets you specify the font context to use.
The PfExtent16dot16() and PfExtent16dot16Cx() functions never load metrics locally. A message is
always sent to the server.
The generic design of this routine allows for future expansion.
If you set PF_RECT in the flags argument,
PfExtent16dot16() and PfExtent16dot16Cx() return the number of
characters that fit within the rectangle specified by clip,
or -1 if an error occurred.
If you don't set PF_RECT in the flags argument,
these functions return 0 on success, or -1 if an error occurred.
Photon
PfExtent16dot16Cx()
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
PfAttach(),
PfAttachCx(),
PfDetach(),
PfDetachCx(),
PfExtentComponents(),
PfExtentComponentsCx(),
PfExtentFractTextCharPositions(),
PfExtentText(),
PfExtentTextCharPositions(),
PfExtentTextCharPositionsCx(),
PfExtentTextToRect(),
PfExtentWideText(),
PfFractionalExtentText(),
PfGenerateFontName(),
PfGenerateFontNameCx(),
PfLoadMetrics(),
PfLoadMetricsCx(),
PhPoint_t,
PhRect_t
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/pfextent16dot16cx.html on line 286
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/pfextent16dot16cx.html on line 286