62 #include <minigui/common.h> 63 #include <minigui/minigui.h> 64 #include <minigui/gdi.h> 65 #include <minigui/fixedmath.h> 67 #ifndef MGPLUS_MAJOR_VERSION 70 # undef PACKAGE_BUGREPORT 72 # undef PACKAGE_STRING 73 # undef PACKAGE_TARNAME 74 # undef PACKAGE_VERSION 75 # ifdef __MGPLUS_LIB__ 76 # if defined(__CMAKE_PROJECT__) || defined(WIN32) 77 # include "mgplusconfig.h" 79 # include "../mgplusconfig.h" 82 # include "mgplusconfig.h" 86 #if defined (WIN32) && !defined(__NODLL__) 87 #if defined (__MGPLUS_LIB__) 88 #define MGPLUS_EXPORT __declspec(dllexport) 90 #define MGPLUS_EXPORT __declspec(dllimport) 101 #define MP_INV_HANDLE 0 158 typedef enum _MPStatus
161 MP_GENERIC_ERROR = 1,
162 MP_INVALID_PARAMETER = 2,
163 MP_OUT_OF_MEMORY = 3,
164 MP_INDEX_NOT_MATCH = 4,
165 MP_NOT_ENOUGH_FIGURE_MEMORY = 5,
166 MP_NOT_IMPLEMENTED = 6,
167 MP_NOT_INITIALIZED = 7,
169 MP_FILE_NOT_FOUNT = 9,
170 MP_VALUE_OVERFLOW = 10,
171 MP_ACCESS_DENIED = 11,
172 MP_UNKNOWN_IMAGE_FORMAT = 12,
173 MP_FONT_FAMILY_NOT_FOUND = 13,
174 MP_FONT_STYLE_NOT_FOUND = 14,
175 MP_NOT_TRUETYPE_FONT = 15,
176 MP_UNSUPPORTED_VERSION = 16
183 typedef enum _MPSmoothingMode
186 MP_SMOOTHING_SPEED = 0,
188 MP_SMOOTHING_QUALITY = 1,
196 typedef enum _MPGlyphRendering
199 MP_GLYPH_REN_NATIVE_MONO,
200 MP_GLYPH_REN_NATIVE_GRAY8,
204 MP_GLYPH_REN_OUTLINE,
206 MP_GLYPH_REN_AGG_MONO,
207 MP_GLYPH_REN_AGG_GRAY8,
214 typedef enum _PATH_VERTEX_COMMANDS
217 PATH_CMD_MOVE_TO = 1,
218 PATH_CMD_LINE_TO = 2,
223 PATH_CMD_UBSPLINE = 7,
224 PATH_CMD_END_POLY = 0x0F,
232 typedef enum _MPOrientation
234 MP_ORIENTATION_CW = 0,
242 typedef enum _MPCompositingMode
248 MP_COMP_OP_CLEAR = 0,
300 typedef enum _MPInterpolationMode
302 MP_INTERPOLATION_MODE_INVALID = -1,
303 MP_INTERPOLATION_MODE_DEFAULT = 0,
304 MP_INTERPOLATION_MODE_LOW_QUALITY = 1,
305 MP_INTERPOLATION_MODE_HIGH_QUALITY = 2,
306 MP_INTERPOLATION_MODE_PERSPECTIVE,
307 MP_INTERPOLATION_MODE_BILINEAR,
308 MP_INTERPOLATION_MODE_AFFINE,
309 MP_INTERPOLATION_MODE_BICUBIC,
310 MP_INTERPOLATION_MODE_NEARESTNEIGHBOR,
311 MP_INTERPOLATION_MODE_HIGH_QUALITY_BILINEAR,
312 MP_INTERPOLATION_MODE_HIGH_QUALITY_BICUBIC
319 typedef enum _MPRenderingControl
322 MP_RENDER_QUALITY = 1,
329 typedef enum _MPTextRenderingHint
331 MP_TEXT_RENDER_HINT_ANTIALIAS_ON = 0,
332 MP_TEXT_RENDER_HINT_ANTIALIAS_OFF = 1,
339 typedef enum _MPPathRenderingHint
341 MP_PATH_RENDER_HINT_ANTIALIAS_ON = 0,
342 MP_PATH_RENDER_HINT_ANTIALIAS_OFF = 1,
355 double sx, shy, shx, sy, tx, ty;
365 unsigned char bbox_x;
366 unsigned char bbox_y;
370 unsigned char bbox_w;
371 unsigned char bbox_h;
383 typedef enum _GLYPH_DATE_TYPE
385 GLYPH_DATA_INVALID = 0,
400 unsigned int glyph_index;
403 unsigned int data_size;
404 GLYPH_DATE_TYPE data_type;
411 typedef enum _MPFillMode
414 MP_PATH_FILL_MODE_WINDING=0,
416 MP_PATH_FILL_MODE_ALTERNATE,
423 typedef enum _LINE_CAP_E
446 typedef enum _LINE_JOIN_E
461 JOIN_MILTER_REVERT = 3,
462 JOIN_MILTER_ROUND = 4
469 typedef enum _MPBrushType
472 MP_BRUSH_TYPE_SOLIDCOLOR = 0,
474 MP_BRUSH_TYPE_HATCHFILL = 1,
476 MP_BRUSH_TYPE_TEXTUREFILL = 2,
478 MP_BRUSH_TYPE_PATHGRADIENT = 3,
480 MP_BRUSH_TYPE_LINEARGRADIENT
487 typedef enum _MPLinearGradientMode
490 MP_LINEAR_GRADIENT_MODE_HORIZONTAL = 0,
492 MP_LINEAR_GRADIENT_MODE_VERTICAL,
494 MP_LINEAR_GRADIENT_MODE_FORWARDDIAGONAL,
496 MP_LINEAR_GRADIENT_MODE_BACKWARDDIAGONAL
627 int sy,
int sw,
int sh,
int dx,
int dy);
675 #define MGPlusGraphicClear(graphics, color) MGPlusGraphicClearEx (graphics, NULL, color) 703 int sx,
int sy,
int sw,
int sh,
int dx,
int dy);
744 MPCompositingMode composite_mode);
761 MPCompositingMode* composite_mode);
889 MPInterpolationMode mode);
906 MPInterpolationMode* mode);
1017 float sx,
float sy);
1077 float x1,
float y1,
float x2,
float y2);
1098 int x1,
int y1,
int x2,
int y2);
1125 float x,
float y,
float width,
float height,
float startangle,
1151 int x,
int y,
int width,
int height,
float startAngle,
1179 float x,
float y,
float width,
float height,
float startangle,
1205 int x,
int y,
int width,
int height,
float startAngle,
1233 float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
1234 float x4,
float y4);
1259 int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
int y4);
1286 float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
1287 float x4,
float y4);
1312 int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
int y4);
1333 float x,
float y,
float width,
float height);
1354 int x,
int y,
int width,
int height);
1375 float x,
float y,
float width,
float height);
1396 int x,
int y,
int width,
int height);
1417 float x,
float y,
float width,
float height);
1438 int x,
int y,
int width,
int height);
1461 float x,
float y,
float width,
float height,
float rx,
float ry);
1463 #define MGPlusDrawRoundRect(graphics, pen, x, y, width, height, r) \ 1464 MGPlusDrawRoundRectEx (graphics, pen, x, y, width, height, r, r) 1487 int x,
int y,
int width,
int height,
int rx,
int ry);
1489 #define MGPlusDrawRoundRectI(graphics, pen, x, y, width, height, r) \ 1490 MGPlusDrawRoundRectIEx (graphics, pen, x, y, width, height, r, r) 1513 float x,
float y,
float width,
float height,
float rx,
float ry);
1515 #define MGPlusFillRoundRect(graphics, brush, x, y, width, height, r) \ 1516 MGPlusFillRoundRectEx (graphics, brush, x, y, width, height, r, r) 1539 int x,
int y,
int width,
int height,
int rx,
int ry);
1541 #define MGPlusFillRoundRectI(graphics, brush, x, y, width, height, r) \ 1542 MGPlusFillRoundRectIEx (graphics, brush, x, y, width, height, r, r) 1563 float cx,
float cy,
float rx,
float ry);
1585 int cx,
int cy,
int rx,
int ry);
1606 float cx,
float cy,
float rx,
float ry);
1628 int cx,
int cy,
int rx,
int ry);
1721 int n_index,
char* file);
1755 MGPLUS_EXPORT PBITMAP MGPlusGraphicGetBitmap (HGRAPHICS graphics,
int n_index);
1806 int n_index,
const MPPOINT* point,
int count);
1832 int x,
int y,
int w,
int h);
1851 int n_index, HPATH path);
1915 MPOrientation orientation);
1933 double* x,
double* y,
int* cmd);
1981 float x2,
float y2);
2044 float ry,
float startAngle,
float sweepAngle);
2067 int rx,
int ry,
int startAngle,
int sweepAngle);
2092 float x2,
float y2,
float x3,
float y3,
float x4,
float y4);
2117 int x2,
int y2,
int x3,
int y3,
int x4,
int y4);
2140 int width,
int height,
int rx,
int ry);
2142 #define MGPlusPathAddRoundRect(path, x, y, width, height, r) \ 2143 MGPlusPathAddRoundRectEx (path, x, y, width, height, r, r) 2178 double x2,
double y2,
double radius);
2203 int x2,
int y2,
int radius);
2295 float x2,
float y2,
float x3,
float y3);
2319 int x2,
int y2,
int x3,
int y3);
2341 float y1,
float x2,
float y2);
2363 int y1,
int x2,
int y2);
2384 float width,
float height);
2405 int width,
int height);
2427 float rx,
float ry, BOOL clockwise);
2449 int rx,
int ry, BOOL clockwise);
2522 const MPPOINT* pt,
float angle);
2681 const unsigned char* dash_list,
int dash_len);
2843 ARGB* rgba,
int count);
2879 MPLinearGradientMode mode);
2895 MPLinearGradientMode* mode);
2927 ARGB* colors,
int count);
2946 ARGB* colors,
int count,
float* position);
2995 ARGB color,
float position);
3025 unsigned face_index, MPGlyphRendering ren_type,
3026 unsigned int width,
unsigned int height, BOOL flip_y);
3069 LPGLYPHMETRICS lpgm, LPGLYPHDATA lpdata);
3090 int x,
int y, LPGLYPHDATA lpdata, ARGB color);
struct _GLYPHDATA GLYPHDATA
enum _LINE_CAP_E LINE_CAP_E
Linear mode.
MGPLUS_EXPORT MPStatus MGPlusPathAddBezier(HPATH path, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
Add a bezier to the path .
MGPLUS_EXPORT MPStatus MGPlusPathAddRectangleI(HPATH path, int x, int y, int width, int height)
Add a rectangle to the path.
MGPLUS_EXPORT MPStatus MGPlusFillRoundRectIEx(HGRAPHICS graphics, HBRUSH brush, int x, int y, int width, int height, int rx, int ry)
Draw a round rect on the graphic.
MGPLUS_EXPORT MPStatus MGPlusFillEllipseI(HGRAPHICS graphics, HBRUSH brush, int cx, int cy, int rx, int ry)
Draw a ellipse on the graphic.
MGPLUS_EXPORT HPEN MGPlusPenCreate(int width, ARGB rgba)
Create a pen.
MGPLUS_EXPORT MPStatus MGPlusPathAddLines(HPATH path, const MPPOINT *points, int count)
Add a series lines to a path.
MGPLUS_EXPORT MPStatus MGPlusSetPathGradientBrushCenterPoint(HBRUSH brush, MPPOINT *point)
Set the center point with path gradient brush.
MGPLUS_EXPORT MPStatus MGPlusDrawEllipseI(HGRAPHICS graphics, HPEN pen, int cx, int cy, int rx, int ry)
Draw a ellipse on the graphic.
struct _GLYPHMETRICS GLYPHMETRICS
MGPLUS_EXPORT MPStatus MGPlusGetCompositingMode(HGRAPHICS graphics, MPCompositingMode *composite_mode)
Get the compositing mode of graphic.
MGPLUS_EXPORT HPATH MGPlusGetGlyphPath(int x, int y, LPGLYPHDATA lpdata)
Get the Glyph outline path.
MGPLUS_EXPORT MPStatus MGPlusDrawLine(HGRAPHICS graphics, HPEN pen, float x1, float y1, float x2, float y2)
Draw a line on the graphic.
MGPLUS_EXPORT MPStatus MGPlusDrawPath(HGRAPHICS graphics, HPEN pen, HPATH path)
Draw the path with a pen on the graphic.
MGPLUS_EXPORT BOOL MGPlusUnregisterFashionLFRDR(void)
Unregisters the Fashion LFRDR.
MGPLUS_EXPORT MPStatus MGPlusPathLineto(HPATH path, float x, float y)
Line the path to a new point.
enum _MPLinearGradientMode MPLinearGradientMode
Linear gradient mode.
MGPLUS_EXPORT MPStatus MGPlusPathStartFigure(HPATH path)
Add a new sub path.
MGPLUS_EXPORT MPStatus MGPlusPenSetDashes(HPEN pen, int dash_phase, const unsigned char *dash_list, int dash_len)
Set the pen dashes.
enum _MPBrushType MPBrushType
Brush type.
MGPLUS_EXPORT MPStatus MGPlusSetLinearGradientBrushColorsEx(HBRUSH brush, ARGB *colors, int count, float *position)
Set the start color and end color with the linear gradient brush, and every color with position info...
MGPLUS_EXPORT MPStatus MGPlusPathMovetoI(HPATH path, int x, int y)
Move the path to a new point.
MGPLUS_EXPORT MPStatus MGPlusSetLinearGradientBrushColors(HBRUSH brush, ARGB *colors, int count)
Set the start color and end color with the linear gradient brush.
MGPLUS_EXPORT MPStatus MGPlusDrawArc(HGRAPHICS graphics, HPEN pen, float x, float y, float width, float height, float startangle, float sweepangle)
Draw a arc on the graphic.
MGPLUS_EXPORT MPStatus MGPlusPenSetJoinStyle(HPEN pen, LINE_JOIN_E line_join)
Set the pen line join style.
enum _MPTextRenderingHint MPTextRenderingHint
Text rendering hint.
MGPLUS_EXPORT MPStatus MGPlusPathRotateAroundPoint(HPATH path, const MPPOINT *pt, float angle)
Transform the special path to rotating around the point.
DWORD HFONT
Data type of font.
MGPLUS_EXPORT MPStatus MGPlusPathArctoI(HPATH path, int x1, int y1, int x2, int y2, int radius)
Add a arc to a path and two tangent line through subpath last vectors, (x1, y1), (x2, y2).
DWORD HPEN
Data type of pen.
MGPLUS_EXPORT MPStatus MGPlusPathReset(HPATH path)
Reset the path.
MGPLUS_EXPORT MPStatus MGPlusGetPathRenderingHint(HGRAPHICS graphics, MPPathRenderingHint *value)
Get the path anti-alias value of graphic.
MGPLUS_EXPORT MPStatus MGPlusPenSetColor(HPEN pen, ARGB rgba)
Set the pen color.
DWORD HGRAPHICS
Data type of graphic.
MGPLUS_EXPORT MPStatus MGPlusGraphicLoadBitmapFromFile(HGRAPHICS graphics, int n_index, char *file)
Load the file to graphic's inner resource.
MGPLUS_EXPORT MPStatus MGPlusSetPathRenderingHint(HGRAPHICS graphics, MPPathRenderingHint value)
Set the path anti-alias value of graphic.
MGPLUS_EXPORT MPStatus MGPlusPathGetPoints(HPATH path, int *count, MPPOINT **pt)
Get the key points coor of the path.
MGPLUS_EXPORT MPStatus MGPlusDeleteFont(HFONT hfont)
Delete font.
MGPLUS_EXPORT MPStatus MGPlusSetLinearGradientBrushMode(HBRUSH brush, MPLinearGradientMode mode)
Set the linear gradient brush mode.
MGPLUS_EXPORT MPStatus MGPlusSetImageAlpha(HGRAPHICS graphics, int alpha)
Set image alpha of graphic.
MGPLUS_EXPORT MPStatus MGPlusSetLinearGradientBrushRect(HBRUSH brush, RECT *rect)
Set the rect of the linear gradient brush.
MGPLUS_EXPORT MPStatus MGPlusDrawEllipse(HGRAPHICS graphics, HPEN pen, float cx, float cy, float rx, float ry)
Draw a ellipse on the graphic.
MGPLUS_EXPORT MPStatus MGPlusPathBezierto(HPATH path, float x1, float y1, float x2, float y2, float x3, float y3)
Add a bezier curve to the last vector.
MGPLUS_EXPORT MPStatus MGPlusPathAddArcI(HPATH path, int cx, int cy, int rx, int ry, int startAngle, int sweepAngle)
Add a arc to a path.
MGPLUS_EXPORT MPStatus MGPlusPathTranslate(HPATH path, float dx, float dy)
Scale the special path.
MGPLUS_EXPORT MPStatus MGPlusFillArcI(HGRAPHICS graphics, HBRUSH brush, int x, int y, int width, int height, float startAngle, float sweepAngle)
Fill a arc on the graphic.
MGPLUS_EXPORT MPStatus MGPlusSetClipPath(HGRAPHICS graphics, HPATH path)
Set the path as a clip on the graphic.
MGPLUS_EXPORT MPStatus MGPlusSetSolidBrushColor(HBRUSH brush, ARGB rgba)
Set color with solid brush.
MGPLUS_EXPORT MPStatus MGPlusSetTextureBrushImage(HBRUSH brush, BITMAP *bitmap)
Set image with texture brush.
MGPLUS_EXPORT MPStatus MGPlusDrawBezier(HGRAPHICS graphics, HPEN pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
Draw a bezier on the graphic.
MGPLUS_EXPORT MPStatus MGPlusGraphicBlend(HGRAPHICS src_gs, HGRAPHICS dst_gs)
Blend between Graphic’s buffer.
MGPLUS_EXPORT MPStatus MGPlusSetCompositingMode(HGRAPHICS graphics, MPCompositingMode composite_mode)
Set the compositing mode of graphic.
MGPLUS_EXPORT MPStatus MGPlusPathDelete(HPATH path)
Delete the HPATH.
MGPLUS_EXPORT MPStatus MGPlusBrushDelete(HBRUSH brush)
Delete a brush.
MGPLUS_EXPORT MPStatus MGPlusPenDelete(HPEN pen)
Delete a pen.
MGPLUS_EXPORT MPStatus MGPlusPathAddEllipse(HPATH path, float cx, float cy, float rx, float ry, BOOL clockwise)
Add a ellipse to a path.
MGPLUS_EXPORT MPStatus MGPlusDrawRectangle(HGRAPHICS graphics, HPEN pen, float x, float y, float width, float height)
Draw a rectangle on the graphic.
MGPLUS_EXPORT MPStatus MGPlusPathAddEllipseI(HPATH path, int cx, int cy, int rx, int ry, BOOL clockwise)
Add a ellipse to a path.
MGPLUS_EXPORT MPStatus MGPlusGraphicUnLoadBitmap(HGRAPHICS graphics, int n_index)
UnLoad the p_bitmap to graphic's inner resource.
MGPLUS_EXPORT MPStatus MGPlusPathQuadraticto(HPATH path, float x1, float y1, float x2, float y2)
Add a quadratic curve to the last vector.
MGPLUS_EXPORT MPStatus MGPlusPathBeziertoI(HPATH path, int x1, int y1, int x2, int y2, int x3, int y3)
Add a bezier curve to the last vector.
enum _MPGlyphRendering MPGlyphRendering
Glyph rendering mode.
MGPLUS_EXPORT MPStatus MGPlusFillRectangleI(HGRAPHICS graphics, HBRUSH brush, int x, int y, int width, int height)
Draw a rectangle on the graphic.
MGPLUS_EXPORT MPStatus MGPlusPathAddRectangle(HPATH path, float x, float y, float width, float height)
Add a rectangle to the path.
MGPLUS_EXPORT MPStatus MGPlusPathAddRoundRectEx(HPATH path, int x, int y, int width, int height, int rx, int ry)
Add a round rect to the path .
MGPLUS_EXPORT MPStatus MGPlusDrawRoundRectIEx(HGRAPHICS graphics, HPEN pen, int x, int y, int width, int height, int rx, int ry)
Draw a roundrect on the graphic.
MGPLUS_EXPORT MPStatus MGPlusGetInterpolationMode(HGRAPHICS graphics, MPInterpolationMode *mode)
Get the interpolation mode of graphic.
MGPLUS_EXPORT MPStatus MGPlusSetInterpolationMode(HGRAPHICS graphics, MPInterpolationMode mode)
Set the interpolation mode of graphic.
MGPLUS_EXPORT int MGPlusSaveHG(HGRAPHICS hg)
Save the graphic to stack.
MGPLUS_EXPORT MPStatus MGPlusGraphicCopy(HGRAPHICS src_gs, HGRAPHICS dst_gs)
Copy the src graphic to dst.
MGPLUS_EXPORT MPStatus MGPlusSetSmoothingMode(HGRAPHICS graphics, MPSmoothingMode value)
Set the smoothing mode of graphic.
enum _MPCompositingMode MPCompositingMode
Compositing mode.
enum _MPStatus MPStatus
Status.
enum _MPFillMode MPFillMode
Path fill mode.
enum _MPPathRenderingHint MPPathRenderingHint
Path rendering hint.
MGPLUS_EXPORT MPStatus MGPlusSetPathGradientBrushSurroundRect(HBRUSH brush, RECT *rect)
Set the single color rect with path gradient brush.
MGPLUS_EXPORT HBRUSH MGPlusBrushCreate(MPBrushType type)
Create a brush.
MGPLUS_EXPORT MPStatus MGPlusPenSetWidth(HPEN pen, int width)
Set the pen width.
MGPLUS_EXPORT MPStatus MGPlusGraphicClearEx(HGRAPHICS graphics, RECT *rect, ARGB color)
Use color to clear graphics with the specific rect.
MGPLUS_EXPORT MPStatus MGPlusGetGlyphOutline(HFONT hfont, unsigned uchar, LPGLYPHMETRICS lpgm, LPGLYPHDATA lpdata)
Get the font path or LPGLYPHMETERICS info through uFormat.
MGPLUS_EXPORT MPStatus MGPlusDrawImageWithPoints(HGRAPHICS graphics, int n_index, const MPPOINT *point, int count)
Draw the image with a series of points on the graphic.
MGPLUS_EXPORT MPStatus MGPlusSetPathGradientBrushSurroundColors(HBRUSH brush, ARGB *rgba, int count)
Set the surround color with path gradient brush.
MGPLUS_EXPORT MPStatus MGPlusDrawArcI(HGRAPHICS graphics, HPEN pen, int x, int y, int width, int height, float startAngle, float sweepAngle)
Draw a arc on the graphic.
enum _PATH_VERTEX_COMMANDS PATH_VERTEX_COMMANDS
Path vertex's command.
MGPLUS_EXPORT MPStatus MGPlusDrawLineI(HGRAPHICS graphics, HPEN pen, int x1, int y1, int x2, int y2)
Draw a line on the graphic.
MGPLUS_EXPORT MPStatus MGPlusPathCloseFigure(HPATH path)
Close the current sub path.
MGPLUS_EXPORT MPStatus MGPlusPathMoveto(HPATH path, float x, float y)
Move the path to a new point.
MGPLUS_EXPORT MPStatus MGPlusFillArc(HGRAPHICS graphics, HBRUSH brush, float x, float y, float width, float height, float startangle, float sweepangle)
Fill a arc on the graphic.
MGPLUS_EXPORT MPStatus MGPlusPathScale(HPATH path, float sx, float sy)
Scale the special path.
MGPLUS_EXPORT MPStatus MGPlusPathAddBezierI(HPATH path, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
Add a bezier to the path .
DWORD HPATH
Data type of path.
enum _LINE_JOIN_E LINE_JOIN_E
Join mode.
enum _MPSmoothingMode MPSmoothingMode
Smoothing mode.
enum _MPRenderingControl MPRenderingControl
Rendering control mode.
enum _GLYPH_DATE_TYPE GLYPH_DATE_TYPE
Glyph data type.
MGPLUS_EXPORT int MGPlusLinearGradientBrushGetColorNumber(HBRUSH brush)
get the linear gradient brush color number.
MGPLUS_EXPORT MPStatus MGPlusDrawRoundRectEx(HGRAPHICS graphics, HPEN pen, float x, float y, float width, float height, float rx, float ry)
Draw a roundrect on the graphic.
MGPLUS_EXPORT MPStatus MGPlusFillEllipse(HGRAPHICS graphics, HBRUSH brush, float cx, float cy, float rx, float ry)
Fill a ellipse on the graphic.
MGPLUS_EXPORT HGRAPHICS MGPlusGraphicCreate(int width, int height)
Create graphic.
enum _MPOrientation MPOrientation
Path vertex's command.
MGPLUS_EXPORT BOOL MGPlusRegisterFashionLFRDR(void)
Registers the Fashion LFRDR.
MGPLUS_EXPORT MPStatus MGPlusGetTextRenderingHint(HGRAPHICS graphics, MPTextRenderingHint *value)
Get the text rendering mode of graphic.
MGPLUS_EXPORT MPStatus MGPlusPathAddCurve(HPATH path, const MPPOINT *points, int count)
Add a curve to a path.
MGPLUS_EXPORT MPStatus MGPlusLinearGradientBrushGetColors(HBRUSH brush, ARGB *color, float *position)
get the linear gradient brush color.
MGPLUS_EXPORT MPStatus MGPlusGraphicDelete(HGRAPHICS graphics)
Delete the graphic.
MGPLUS_EXPORT MPStatus MGPlusPathArcto(HPATH path, double x1, double y1, double x2, double y2, double radius)
Add a arc to a path and two tangent line of arc.
MGPLUS_EXPORT MPStatus MGPlusDrawRectangleI(HGRAPHICS graphics, HPEN pen, int x, int y, int width, int height)
Draw a rectangle on the graphic.
MGPLUS_EXPORT MPStatus MGPlusFillRectangle(HGRAPHICS graphics, HBRUSH brush, float x, float y, float width, float height)
Draw a rectangle on the graphic.
MGPLUS_EXPORT MPStatus MGPlusPathAddArc(HPATH path, float cx, float cy, float rx, float ry, float startAngle, float sweepAngle)
Add a arc to a path.
MGPLUS_EXPORT MPStatus MGPlusLinearGradientBrushAddColor(HBRUSH brush, ARGB color, float position)
Add the linear gradient brush color.
MGPLUS_EXPORT MPStatus MGPlusPathLinetoI(HPATH path, int x, int y)
Line the path to a new point.
MGPLUS_EXPORT MPStatus MGPlusGetSmoothingMode(HGRAPHICS graphics, MPSmoothingMode *value)
Set the smoothing mode of graphic.
DWORD ARGB
Data type of color.
MGPLUS_EXPORT MPStatus MGPlusPathGetPointCount(HPATH path, int *count)
Get the key points count of the path.
MGPLUS_EXPORT MPStatus MGPlusFillBezier(HGRAPHICS graphics, HBRUSH brush, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
Fill a bezier on the graphic.
struct _MPMatrix MPMatrix
MGPLUS_EXPORT MPStatus MGPlusGetLinearGradientBrushMode(HBRUSH brush, MPLinearGradientMode *mode)
Get the linear gradient brush mode.
MGPLUS_EXPORT HDC MGPlusGetGraphicDC(HGRAPHICS graphic)
Get graphic’s buffer hdc.
MGPLUS_EXPORT BOOL MGPlusRestoreHG(HGRAPHICS hg, int saved_hg)
Restore the graphic.
MGPLUS_EXPORT HPATH MGPlusPathCreate(MPFillMode brushMode)
Create a path.
MPStatus MGPlusGetSolidBrushColor(HBRUSH brush, ARGB *rgba)
Set color with solid brush.
MGPLUS_EXPORT MPStatus MGPlusFillPath(HGRAPHICS graphics, HBRUSH brush, HPATH path)
Fill the path with a brush on the graphic.
MGPLUS_EXPORT MPStatus MGPlusGraphicSave(HGRAPHICS graphics, HDC hdc, int sx, int sy, int sw, int sh, int dx, int dy)
Create Graphic’s buffer through hdc.
MGPLUS_EXPORT MPStatus MGPlusSetTextRenderingHint(HGRAPHICS graphics, MPTextRenderingHint value)
Set the text rendering mode of graphic.
MGPLUS_EXPORT MPStatus MGPlusPathSetTransform(HPATH path, MPMatrix *matrix)
Set the transform matrix to the special path.
MGPLUS_EXPORT MPStatus MGPlusPathQuadratictoI(HPATH path, int x1, int y1, int x2, int y2)
Add a quadratic curve to the last vector.
MGPLUS_EXPORT MPStatus MGPlusDrawBezierI(HGRAPHICS graphics, HPEN pen, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
Draw a bezier on the graphic.
MGPLUS_EXPORT MPStatus MGPlusDrawGlyph(HGRAPHICS graphics, HFONT hfont, int x, int y, LPGLYPHDATA lpdata, ARGB color)
Draw glyph path.
MGPLUS_EXPORT MPStatus MGPlusDrawImageWithPath(HGRAPHICS graphics, int n_index, HPATH path)
Draw the image with a path on the graphic.
MGPLUS_EXPORT MPStatus MGPlusPathGetVertex(HPATH path, int idx, double *x, double *y, int *cmd)
Get the special idx vertex of the path.
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.
MGPLUS_EXPORT HGRAPHICS MGPlusGraphicCreateWithoutCanvas(HDC hdc)
Create graphic from hdc and use hdc's surface as canvas.
MGPLUS_EXPORT MPStatus MGPlusPathSetAllOrientation(HPATH path, MPOrientation orientation)
Set all path orientation.
MGPLUS_EXPORT MPStatus MGPlusFillBezierI(HGRAPHICS graphics, HBRUSH brush, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
Fill a bezier on the graphic.
MGPLUS_EXPORT MPStatus MGPlusGraphicCopyFromDC(HGRAPHICS graphic, HDC hdc, int sx, int sy, int sw, int sh, int dx, int dy)
Copy the hdc content to graphic.
DWORD HBRUSH
Data type of brush.
MGPLUS_EXPORT MPStatus MGPlusGetImageAlpha(HGRAPHICS graphics, int *alpha)
Get image alpha of graphic.
MGPLUS_EXPORT MPStatus MGPlusPenSetCapStyle(HPEN pen, LINE_CAP_E line_cap)
Set the pen line cap style.
MGPLUS_EXPORT MPStatus MGPlusPathRotate(HPATH path, float angle)
Scale the special path.
MGPLUS_EXPORT MPStatus MGPlusPathGetTransform(HPATH path, MPMatrix *matrix)
Get the special path's transform matrix .
MGPLUS_EXPORT MPStatus MGPlusPathAddLineI(HPATH path, int x1, int y1, int x2, int y2)
Add a line to a path.
MGPLUS_EXPORT MPStatus MGPlusPathAddPath(HPATH path, HPATH add_path)
copy a path to the other path.
MGPLUS_EXPORT MPStatus MGPlusFillRoundRectEx(HGRAPHICS graphics, HBRUSH brush, float x, float y, float width, float height, float rx, float ry)
Draw a round rect on the graphic.
MGPLUS_EXPORT HGRAPHICS MGPlusGraphicCreateFromDC(HDC hdc)
Create Graphic’s buffer through hdc.
MGPLUS_EXPORT MPStatus MGPlusDrawImage(HGRAPHICS graphics, int n_index, int x, int y, int w, int h)
Draw the image with on the graphic.
MGPLUS_EXPORT MPStatus MGPlusSetPathGradientBrushCenterColor(HBRUSH brush, ARGB rgba)
Set the center point color with path gradient brush.
MGPLUS_EXPORT MPStatus MGPlusPathAddLine(HPATH path, float x1, float y1, float x2, float y2)
Add a line to a path.
MGPLUS_EXPORT MPStatus MGPlusGraphicLoadBitmap(HGRAPHICS graphics, int n_index, PBITMAP p_bitmap)
Load the p_bitmap to graphic's inner resource.
enum _MPInterpolationMode MPInterpolationMode
Interpolation mode.
MGPLUS_EXPORT MPStatus MGPlusPathResetTransform(HPATH path)
Reset the transform matrix of the special path.