Glyph

Functions


Detailed Description

MGPlus maintains some glyph defines and operations


Function Documentation

HFONT MGPlusCreateFont ( const char *  font_name,
unsigned  face_index,
MPGlyphRendering  ren_type,
unsigned int  width,
unsigned int  height,
BOOL  flip_y 
)

Create ttf font.

This function get the glyph outline path from outline's data buffer.

Parameters:
font_name The create font name.
face_index The font's face index.
ren_type The font render type.
width The font width.
height The font height.
flip_y The glyph's y-coor flip, if true, flip the y coordinate.
Returns:
If success, it returns the font handle.
HPATH MGPlusDeleteFont ( HFONT  hfont  ) 

Delete font.

This function destroy the special font.

Parameters:
hfont The handle pointer of font.
Returns:
If success, it returns MP_OK.
MGPLUS_EXPORT MPStatus MGPlusDrawGlyph ( HGRAPHICS  graphics,
HFONT  hfont,
int  x,
int  y,
LPGLYPHDATA  lpdata,
ARGB  color 
)

Draw glyph path.

This function draw glyph at x/y position with glyph data, user should be special render glyph color.

Parameters:
graphics The graphic handler.
hfont The pointer of font.
x The x coordinate of glyph.
y The y coordinate of glyph.
lpdata The glyph data pointer.
color The render glyph color.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
MPStatus MGPlusGetGlyphOutline ( HFONT  hfont,
unsigned  uchar,
LPGLYPHMETRICS  lpgm,
LPGLYPHDATA  lpdata 
)

Get the font path or LPGLYPHMETERICS info through uFormat.

This function get the font path from the glyph data.

Parameters:
hfont The pointer of font.
uchar The query character.
lpgm The LPGLYPHMETRICS pointer.
lpdata The glyph data pointer.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
HPATH MGPlusGetGlyphPath ( int  x,
int  y,
LPGLYPHDATA  lpdata 
)

Get the Glyph outline path.

This function get the glyph outline path from outline's data buffer.

Parameters:
x The x coordinate of glyph.
y The y coordinate of glyph.
lpdata The pointer of glyph outline data.
Returns:
If success, it returns the path.
Generated on Wed Apr 27 09:48:11 2011 for mGPlus V1.2.4 API Reference by  doxygen 1.6.3