mGPlus API Reference
v1.4.0
A MiniGUI component which provides support for advanced 2D graphics functions
|
Functions | |
MGPLUS_EXPORT HFONT | MGPlusCreateFont (const char *font_name, unsigned face_index, MPGlyphRendering ren_type, unsigned int width, unsigned int height, BOOL flip_y) |
Create ttf font. More... | |
MGPLUS_EXPORT MPStatus | MGPlusDeleteFont (HFONT hfont) |
Delete font. More... | |
MGPLUS_EXPORT HPATH | MGPlusGetGlyphPath (int x, int y, LPGLYPHDATA lpdata) |
Get the Glyph outline path. More... | |
MGPLUS_EXPORT MPStatus | MGPlusGetGlyphOutline (HFONT hfont, unsigned uchar, LPGLYPHMETRICS lpgm, LPGLYPHDATA lpdata) |
Get the font path or LPGLYPHMETERICS info through uFormat. More... | |
MGPLUS_EXPORT MPStatus | MGPlusDrawGlyph (HGRAPHICS graphics, HFONT hfont, int x, int y, LPGLYPHDATA lpdata, ARGB color) |
Draw glyph path. More... | |
MGPlus maintains some glyph defines and operations
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.
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. |
Delete font.
This function destroy the special font.
hfont | The handle pointer of font. |
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.
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. |
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.
hfont | The pointer of font. |
uchar | The query character. |
lpgm | The LPGLYPHMETRICS pointer. |
lpdata | The glyph data pointer. |
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.
x | The x coordinate of glyph. |
y | The y coordinate of glyph. |
lpdata | The pointer of glyph outline data. |