00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00026 #ifndef _MGPLUS_H
00027 #define _MGPLUS_H
00028
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032
00033 #include <minigui/common.h>
00034 #include <minigui/minigui.h>
00035 #include <minigui/gdi.h>
00036 #include <minigui/fixedmath.h>
00037
00038 #ifndef MGPLUS_MAJOR_VERSION
00039 # ifdef __MGPLUS_LIB__
00040 # if defined(__CMAKE_PROJECT__) || defined(WIN32)
00041 # include "mgplusconfig.h"
00042 # else
00043 # include "../mgplusconfig.h"
00044 # endif
00045 # else
00046 # include "mgplusconfig.h"
00047 # undef PACKAGE_BUGREPORT
00048 # undef PACKAGE_NAME
00049 # undef PACKAGE_STRING
00050 # undef PACKAGE_TARNAME
00051 # undef PACKAGE_VERSION
00052 # endif
00053 #endif
00054
00055 #if defined (WIN32) && !defined(__NODLL__)
00056 #if defined (__MGPLUS_LIB__)
00057 #define MGPLUS_EXPORT __declspec(dllexport)
00058 #else
00059 #define MGPLUS_EXPORT __declspec(dllimport)
00060 #endif
00061 #else
00062 #define MGPLUS_EXPORT
00063 #endif
00064
00070 #define MP_INV_HANDLE 0
00071
00077 typedef DWORD HGRAPHICS;
00078
00084 typedef DWORD HPATH;
00085
00091 typedef DWORD HBRUSH;
00092
00098 typedef DWORD HPEN;
00099
00105 typedef DWORD HFONT;
00106
00112 typedef DWORD ARGB;
00113
00117 typedef struct _MPPOINT
00118 {
00119 float x;
00120 float y;
00121 }MPPOINT;
00122
00127 typedef enum _MPStatus
00128 {
00129 MP_OK = 0,
00130 MP_GENERIC_ERROR = 1,
00131 MP_INVALID_PARAMETER = 2,
00132 MP_OUT_OF_MEMORY = 3,
00133 MP_INDEX_NOT_MATCH = 4,
00134 MP_NOT_ENOUGH_FIGURE_MEMORY = 5,
00135 MP_NOT_IMPLEMENTED = 6,
00136 MP_NOT_INITIALIZED = 7,
00137 MP_ABORTED = 8,
00138 MP_FILE_NOT_FOUNT = 9,
00139 MP_VALUE_OVERFLOW = 10,
00140 MP_ACCESS_DENIED = 11,
00141 MP_UNKNOWN_IMAGE_FORMAT = 12,
00142 MP_FONT_FAMILY_NOT_FOUND = 13,
00143 MP_FONT_STYLE_NOT_FOUND = 14,
00144 MP_NOT_TRUETYPE_FONT = 15,
00145 MP_UNSUPPORTED_VERSION = 16
00146 }MPStatus;
00147
00152 typedef enum _MPSmoothingMode
00153 {
00154
00155 MP_SMOOTHING_SPEED = 0,
00156
00157 MP_SMOOTHING_QUALITY = 1,
00158 }MPSmoothingMode;
00159
00160
00165 typedef enum _MPGlyphRendering
00166 {
00167
00168 MP_GLYPH_REN_NATIVE_MONO,
00169 MP_GLYPH_REN_NATIVE_GRAY8,
00170
00171
00172
00173 MP_GLYPH_REN_OUTLINE,
00174
00175 MP_GLYPH_REN_AGG_MONO,
00176 MP_GLYPH_REN_AGG_GRAY8,
00177 }MPGlyphRendering;
00178
00183 typedef enum _PATH_VERTEX_COMMANDS
00184 {
00185 PATH_CMD_STOP = 0,
00186 PATH_CMD_MOVE_TO = 1,
00187 PATH_CMD_LINE_TO = 2,
00188 PATH_CMD_CURVE3 = 3,
00189 PATH_CMD_CURVE4 = 4,
00190 PATH_CMD_CURVEN = 5,
00191 PATH_CMD_CATROM = 6,
00192 PATH_CMD_UBSPLINE = 7,
00193 PATH_CMD_END_POLY = 0x0F,
00194 PATH_CMD_MASK = 0x0F
00195 }PATH_VERTEX_COMMANDS;
00196
00201 typedef enum _MPOrientation
00202 {
00203 MP_ORIENTATION_CW = 0,
00204 MP_ORIENTATION_CCW
00205 }MPOrientation;
00206
00211 typedef enum _MPCompositingMode
00212 {
00213
00214
00215
00216
00217 MP_COMP_OP_CLEAR = 0,
00218
00219
00220
00221 MP_COMP_OP_SRC,
00222
00223
00224 MP_COMP_OP_DST,
00225
00226
00227
00228 MP_COMP_OP_SRC_OVER,
00229
00230
00231
00232 MP_COMP_OP_DST_OVER,
00233
00234
00235
00236 MP_COMP_OP_SRC_IN,
00237
00238
00239
00240 MP_COMP_OP_DST_IN,
00241
00242
00243
00244 MP_COMP_OP_SRC_OUT,
00245
00246
00247
00248 MP_COMP_OP_DST_OUT,
00249
00250
00251
00252 MP_COMP_OP_SRC_ATOP,
00253
00254
00255
00256
00257 MP_COMP_OP_DST_ATOP,
00258
00259
00260
00261
00262 MP_COMP_OP_XOR,
00263 }MPCompositingMode;
00264
00269 typedef enum _MPInterpolationMode
00270 {
00271 MP_INTERPOLATION_MODE_INVALID = -1,
00272 MP_INTERPOLATION_MODE_DEFAULT = 0,
00273 MP_INTERPOLATION_MODE_LOW_QUALITY = 1,
00274 MP_INTERPOLATION_MODE_HIGH_QUALITY = 2,
00275 MP_INTERPOLATION_MODE_PERSPECTIVE,
00276 MP_INTERPOLATION_MODE_BILINEAR,
00277 MP_INTERPOLATION_MODE_AFFINE,
00278 MP_INTERPOLATION_MODE_BICUBIC,
00279 MP_INTERPOLATION_MODE_NEARESTNEIGHBOR,
00280 MP_INTERPOLATION_MODE_HIGH_QUALITY_BILINEAR,
00281 MP_INTERPOLATION_MODE_HIGH_QUALITY_BICUBIC
00282 }MPInterpolationMode;
00283
00288 typedef enum _MPRenderingControl
00289 {
00290 MP_RENDER_SPEED = 0,
00291 MP_RENDER_QUALITY = 1,
00292 }MPRenderingControl;
00293
00298 typedef enum _MPTextRenderingHint
00299 {
00300 MP_TEXT_RENDER_HINT_ANTIALIAS_ON = 0,
00301 MP_TEXT_RENDER_HINT_ANTIALIAS_OFF = 1,
00302 }MPTextRenderingHint;
00303
00308 typedef enum _MPPathRenderingHint
00309 {
00310 MP_PATH_RENDER_HINT_ANTIALIAS_ON = 0,
00311 MP_PATH_RENDER_HINT_ANTIALIAS_OFF = 1,
00312 }MPPathRenderingHint;
00313
00317 typedef struct _MPMatrix
00318 {
00319
00320
00321
00322
00323
00324 double sx, shy, shx, sy, tx, ty;
00325 }MPMatrix;
00326
00330 typedef struct _GLYPHMETRICS {
00331
00332
00333
00334 unsigned char bbox_x;
00335 unsigned char bbox_y;
00336
00337
00338
00339 unsigned char bbox_w;
00340 unsigned char bbox_h;
00341
00342
00343
00344 short adv_x;
00345 short adv_y;
00346 } GLYPHMETRICS, *LPGLYPHMETRICS;
00347
00352 typedef enum _GLYPH_DATE_TYPE
00353 {
00354 GLYPH_DATA_INVALID = 0,
00355
00356 GLYPH_DATA_MONO,
00357
00358 GLYPH_DATA_GRAY8,
00359
00360 GLYPH_DATA_OUTLINE
00361 }GLYPH_DATE_TYPE;
00362
00366 typedef struct _GLYPHDATA
00367 {
00368
00369 unsigned int glyph_index;
00370
00371 BYTE* data;
00372 unsigned int data_size;
00373 GLYPH_DATE_TYPE data_type;
00374 } GLYPHDATA, *LPGLYPHDATA;
00375
00380 typedef enum _MPFillMode
00381 {
00382
00383 MP_PATH_FILL_MODE_WINDING=0,
00384
00385 MP_PATH_FILL_MODE_ALTERNATE,
00386 }MPFillMode;
00387
00392 typedef enum _LINE_CAP_E
00393 {
00394
00395
00396
00397
00398 CAP_BUTT = 0,
00399
00400
00401
00402
00403 CAP_ROUND = 1,
00404
00405
00406
00407
00408 CAP_SQUARE = 2,
00409 }LINE_CAP_E;
00410
00415 typedef enum _LINE_JOIN_E
00416 {
00417
00418
00419
00420 JOIN_MITER = 0,
00421
00422
00423
00424 JOIN_ROUND = 1,
00425
00426
00427
00428 JOIN_BEVEL = 2,
00429
00430 JOIN_MILTER_REVERT = 3,
00431 JOIN_MILTER_ROUND = 4
00432 }LINE_JOIN_E;
00433
00438 typedef enum _MPBrushType
00439 {
00440
00441 MP_BRUSH_TYPE_SOLIDCOLOR = 0,
00442
00443 MP_BRUSH_TYPE_HATCHFILL = 1,
00444
00445 MP_BRUSH_TYPE_TEXTUREFILL = 2,
00446
00447 MP_BRUSH_TYPE_PATHGRADIENT = 3,
00448
00449 MP_BRUSH_TYPE_LINEARGRADIENT
00450 }MPBrushType;
00451
00456 typedef enum _MPLinearGradientMode
00457 {
00458
00459 MP_LINEAR_GRADIENT_MODE_HORIZONTAL = 0,
00460
00461 MP_LINEAR_GRADIENT_MODE_VERTICAL,
00462
00463 MP_LINEAR_GRADIENT_MODE_FORWARDDIAGONAL,
00464
00465 MP_LINEAR_GRADIENT_MODE_BACKWARDDIAGONAL
00466 }MPLinearGradientMode;
00467
00491 MGPLUS_EXPORT HGRAPHICS MGPlusGraphicCreateFromDC (HDC hdc);
00492
00506 MGPLUS_EXPORT HGRAPHICS MGPlusGraphicCreateWithoutCanvas(HDC hdc);
00507
00520 MGPLUS_EXPORT HDC MGPlusGetGraphicDC (HGRAPHICS graphic);
00521
00535 MGPLUS_EXPORT HGRAPHICS MGPlusGraphicCreate (int width, int height);
00536
00550 MGPLUS_EXPORT int MGPlusSaveHG (HGRAPHICS hg);
00551
00571 MGPLUS_EXPORT BOOL MGPlusRestoreHG (HGRAPHICS hg, int saved_hg);
00572
00595 MGPLUS_EXPORT MPStatus MGPlusGraphicCopyFromDC (HGRAPHICS graphic, HDC hdc, int sx,
00596 int sy, int sw, int sh, int dx, int dy);
00597
00611 MGPLUS_EXPORT MPStatus MGPlusGraphicCopy (HGRAPHICS src_gs, HGRAPHICS dst_gs);
00612
00626 MGPLUS_EXPORT MPStatus MGPlusGraphicBlend (HGRAPHICS src_gs, HGRAPHICS dst_gs);
00627
00642 MGPLUS_EXPORT MPStatus MGPlusGraphicClearEx (HGRAPHICS graphics, RECT* rect, ARGB color);
00643
00644 #define MGPlusGraphicClear(graphics, color) MGPlusGraphicClearEx (graphics, NULL, color)
00645
00671 MGPLUS_EXPORT MPStatus MGPlusGraphicSave (HGRAPHICS graphics, HDC hdc,
00672 int sx, int sy, int sw, int sh, int dx, int dy);
00673
00686 MGPLUS_EXPORT MPStatus MGPlusGraphicDelete (HGRAPHICS graphics);
00687
00712 MGPLUS_EXPORT MPStatus MGPlusSetCompositingMode (HGRAPHICS graphics,
00713 MPCompositingMode composite_mode);
00714
00729 MGPLUS_EXPORT MPStatus MGPlusGetCompositingMode (HGRAPHICS graphics,
00730 MPCompositingMode* composite_mode);
00731
00756 MGPLUS_EXPORT MPStatus MGPlusGetSmoothingMode (HGRAPHICS graphics, MPSmoothingMode* value);
00757
00772 MGPLUS_EXPORT MPStatus MGPlusSetSmoothingMode (HGRAPHICS graphics, MPSmoothingMode value);
00773
00788 MGPLUS_EXPORT MPStatus MGPlusSetPathRenderingHint (HGRAPHICS graphics,
00789 MPPathRenderingHint value);
00790
00805 MGPLUS_EXPORT MPStatus MGPlusGetPathRenderingHint (HGRAPHICS graphics,
00806 MPPathRenderingHint* value);
00807
00822 MGPLUS_EXPORT MPStatus MGPlusSetTextRenderingHint (HGRAPHICS graphics,
00823 MPTextRenderingHint value);
00824
00840 MGPLUS_EXPORT MPStatus MGPlusGetTextRenderingHint (HGRAPHICS graphics,
00841 MPTextRenderingHint* value);
00842
00857 MGPLUS_EXPORT MPStatus MGPlusSetInterpolationMode (HGRAPHICS graphics,
00858 MPInterpolationMode mode);
00859
00874 MGPLUS_EXPORT MPStatus MGPlusGetInterpolationMode (HGRAPHICS graphics,
00875 MPInterpolationMode* mode);
00876
00901 MGPLUS_EXPORT MPStatus MGPlusSetWorldTransform (HGRAPHICS graphics,
00902 MPMatrix *matrix);
00903
00919 MGPLUS_EXPORT MPStatus MGPlusWorldTransform (HGRAPHICS graphics, MPMatrix *matrix);
00920
00936 MGPLUS_EXPORT MPStatus MGPlusGetWorldTransform (HGRAPHICS graphics, MPMatrix *matrix);
00937
00950 MGPLUS_EXPORT MPStatus MGPlusResetWorldTransform (HGRAPHICS graphics);
00951
00967 MGPLUS_EXPORT MPStatus MGPlusTranslateWorldTransform (HGRAPHICS graphics,
00968 float dx, float dy);
00969
00985 MGPLUS_EXPORT MPStatus MGPlusScaleWorldTransform (HGRAPHICS graphics,
00986 float sx, float sy);
00987
01002 MGPLUS_EXPORT MPStatus MGPlusRotateWorldTransform (HGRAPHICS graphics,
01003 float angle);
01004
01015 MGPLUS_EXPORT MPStatus MGPlusPathTransform (HPATH path);
01016
01045 MGPLUS_EXPORT MPStatus MGPlusDrawLine (HGRAPHICS graphics, HPEN pen,
01046 float x1, float y1, float x2, float y2);
01047
01066 MGPLUS_EXPORT MPStatus MGPlusDrawLineI (HGRAPHICS graphics, HPEN pen,
01067 int x1, int y1, int x2, int y2);
01068
01093 MGPLUS_EXPORT MPStatus MGPlusDrawArc (HGRAPHICS graphics, HPEN pen,
01094 float x, float y, float width, float height, float startangle,
01095 float sweepangle);
01096
01119 MGPLUS_EXPORT MPStatus MGPlusDrawArcI (HGRAPHICS graphics, HPEN pen,
01120 int x, int y, int width, int height, float startAngle,
01121 float sweepAngle);
01122
01147 MGPLUS_EXPORT MPStatus MGPlusFillArc (HGRAPHICS graphics, HBRUSH brush,
01148 float x, float y, float width, float height, float startangle,
01149 float sweepangle);
01150
01173 MGPLUS_EXPORT MPStatus MGPlusFillArcI (HGRAPHICS graphics, HBRUSH brush,
01174 int x, int y, int width, int height, float startAngle,
01175 float sweepAngle);
01176
01201 MGPLUS_EXPORT MPStatus MGPlusDrawBezier (HGRAPHICS graphics, HPEN pen,
01202 float x1, float y1, float x2, float y2, float x3, float y3,
01203 float x4, float y4);
01204
01227 MGPLUS_EXPORT MPStatus MGPlusDrawBezierI (HGRAPHICS graphics, HPEN pen,
01228 int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
01229
01254 MGPLUS_EXPORT MPStatus MGPlusFillBezier (HGRAPHICS graphics, HBRUSH brush,
01255 float x1, float y1, float x2, float y2, float x3, float y3,
01256 float x4, float y4);
01257
01280 MGPLUS_EXPORT MPStatus MGPlusFillBezierI (HGRAPHICS graphics, HBRUSH brush,
01281 int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
01282
01301 MGPLUS_EXPORT MPStatus MGPlusFillRectangle (HGRAPHICS graphics, HBRUSH brush,
01302 float x, float y, float width, float height);
01303
01322 MGPLUS_EXPORT MPStatus MGPlusFillRectangleI (HGRAPHICS graphics, HBRUSH brush,
01323 int x, int y, int width, int height);
01324
01343 MGPLUS_EXPORT MPStatus MGPlusDrawRectangle (HGRAPHICS graphics, HPEN pen,
01344 float x, float y, float width, float height);
01345
01364 MGPLUS_EXPORT MPStatus MGPlusDrawRectangleI (HGRAPHICS graphics, HPEN pen,
01365 int x, int y, int width, int height);
01366
01385 MGPLUS_EXPORT MPStatus MGPlusFillRectangle (HGRAPHICS graphics, HBRUSH brush,
01386 float x, float y, float width, float height);
01387
01406 MGPLUS_EXPORT MPStatus MGPlusFillRectangleI (HGRAPHICS graphics, HBRUSH brush,
01407 int x, int y, int width, int height);
01408
01429 MGPLUS_EXPORT MPStatus MGPlusDrawRoundRectEx (HGRAPHICS graphics, HPEN pen,
01430 float x, float y, float width, float height, float rx, float ry);
01431
01432 #define MGPlusDrawRoundRect(graphics, pen, x, y, width, height, r) \
01433 MGPlusDrawRoundRectEx (graphics, pen, x, y, width, height, r, r)
01434
01455 MGPLUS_EXPORT MPStatus MGPlusDrawRoundRectIEx (HGRAPHICS graphics, HPEN pen,
01456 int x, int y, int width, int height, int rx, int ry);
01457
01458 #define MGPlusDrawRoundRectI(graphics, pen, x, y, width, height, r) \
01459 MGPlusDrawRoundRectIEx (graphics, pen, x, y, width, height, r, r)
01460
01481 MGPLUS_EXPORT MPStatus MGPlusFillRoundRectEx (HGRAPHICS graphics, HBRUSH brush,
01482 float x, float y, float width, float height, float rx, float ry);
01483
01484 #define MGPlusFillRoundRect(graphics, brush, x, y, width, height, r) \
01485 MGPlusFillRoundRectEx (graphics, brush, x, y, width, height, r, r)
01486
01507 MGPLUS_EXPORT MPStatus MGPlusFillRoundRectIEx (HGRAPHICS graphics, HBRUSH brush,
01508 int x, int y, int width, int height, int rx, int ry);
01509
01510 #define MGPlusFillRoundRectI(graphics, brush, x, y, width, height, r) \
01511 MGPlusFillRoundRectIEx (graphics, brush, x, y, width, height, r, r)
01512
01531 MGPLUS_EXPORT MPStatus MGPlusDrawEllipse (HGRAPHICS graphics, HPEN pen,
01532 float cx, float cy, float rx, float ry);
01533
01553 MGPLUS_EXPORT MPStatus MGPlusDrawEllipseI (HGRAPHICS graphics, HPEN pen,
01554 int cx, int cy, int rx, int ry);
01555
01574 MGPLUS_EXPORT MPStatus MGPlusFillEllipse (HGRAPHICS graphics, HBRUSH brush,
01575 float cx, float cy, float rx, float ry);
01576
01596 MGPLUS_EXPORT MPStatus MGPlusFillEllipseI (HGRAPHICS graphics, HBRUSH brush,
01597 int cx, int cy, int rx, int ry);
01598
01614 MGPLUS_EXPORT MPStatus MGPlusSetClipPath (HGRAPHICS graphics, HPATH path);
01615
01632 MGPLUS_EXPORT MPStatus MGPlusFillPath (HGRAPHICS graphics, HBRUSH brush,
01633 HPATH path);
01634
01651 MGPLUS_EXPORT MPStatus MGPlusDrawPath (HGRAPHICS graphics, HPEN pen,
01652 HPATH path);
01653
01670 MGPLUS_EXPORT MPStatus MGPlusGraphicLoadBitmap (HGRAPHICS graphics, int n_index,
01671 PBITMAP p_bitmap);
01672
01689 MGPLUS_EXPORT MPStatus MGPlusGraphicLoadBitmapFromFile (HGRAPHICS graphics,
01690 int n_index, char* file);
01691
01707 MGPLUS_EXPORT MPStatus MGPlusGraphicUnLoadBitmap (HGRAPHICS graphics, int n_index);
01708
01724 MGPLUS_EXPORT PBITMAP MGPlusGraphicGetBitmap (HGRAPHICS graphics, int n_index);
01725
01740 MGPLUS_EXPORT MPStatus MGPlusSetImageAlpha (HGRAPHICS graphics, int alpha);
01741
01756 MGPLUS_EXPORT MPStatus MGPlusGetImageAlpha (HGRAPHICS graphics, int* alpha);
01757
01774 MGPLUS_EXPORT MPStatus MGPlusDrawImageWithPoints (HGRAPHICS graphics,
01775 int n_index, const MPPOINT* point, int count);
01776
01800 MGPLUS_EXPORT MPStatus MGPlusDrawImage (HGRAPHICS graphics, int n_index,
01801 int x, int y, int w, int h);
01802
01819 MGPLUS_EXPORT MPStatus MGPlusDrawImageWithPath (HGRAPHICS graphics,
01820 int n_index, HPATH path);
01821
01844 MGPLUS_EXPORT HPATH MGPlusPathCreate (MPFillMode brushMode);
01845
01858 MGPLUS_EXPORT MPStatus MGPlusPathDelete (HPATH path);
01859
01870 MGPLUS_EXPORT MPStatus MGPlusPathReset (HPATH path);
01871
01883 MGPLUS_EXPORT MPStatus MGPlusPathSetAllOrientation (HPATH path,
01884 MPOrientation orientation);
01885
01901 MGPLUS_EXPORT MPStatus MGPlusPathGetVertex (HPATH path, int idx,
01902 double* x, double* y, int* cmd);
01903
01915 MGPLUS_EXPORT MPStatus MGPlusPathGetPointCount (HPATH path, int* count);
01916
01929 MGPLUS_EXPORT MPStatus MGPlusPathGetPoints (HPATH path, int* count, MPPOINT** pt);
01930
01949 MGPLUS_EXPORT MPStatus MGPlusPathAddLine (HPATH path, float x1, float y1,
01950 float x2, float y2);
01951
01970 MGPLUS_EXPORT MPStatus MGPlusPathAddLineI (HPATH path, int x1, int y1,
01971 int x2, int y2);
01972
01989 MGPLUS_EXPORT MPStatus MGPlusPathAddLines (HPATH path, const MPPOINT* points,
01990 int count);
01991
02012 MGPLUS_EXPORT MPStatus MGPlusPathAddArc (HPATH path, float cx, float cy, float rx,
02013 float ry, float startAngle, float sweepAngle);
02014
02035 MGPLUS_EXPORT MPStatus MGPlusPathAddArcI (HPATH path, int cx, int cy,
02036 int rx, int ry, int startAngle, int sweepAngle);
02037
02060 MGPLUS_EXPORT MPStatus MGPlusPathAddBezier (HPATH path, float x1, float y1,
02061 float x2, float y2, float x3, float y3, float x4, float y4);
02062
02085 MGPLUS_EXPORT MPStatus MGPlusPathAddBezierI (HPATH path, int x1, int y1,
02086 int x2, int y2, int x3, int y3, int x4, int y4);
02087
02108 MGPLUS_EXPORT MPStatus MGPlusPathAddRoundRectEx (HPATH path, int x, int y,
02109 int width, int height, int rx, int ry);
02110
02111 #define MGPlusPathAddRoundRect(path, x, y, width, height, r) \
02112 MGPlusPathAddRoundRectEx (path, x, y, width, height, r, r)
02113
02146 MGPLUS_EXPORT MPStatus MGPlusPathArcto (HPATH path, double x1, double y1,
02147 double x2, double y2, double radius);
02148
02171 MGPLUS_EXPORT MPStatus MGPlusPathArctoI (HPATH path, int x1, int y1,
02172 int x2, int y2, int radius);
02173
02189 MGPLUS_EXPORT MPStatus MGPlusPathMoveto (HPATH path, float x, float y);
02190
02206 MGPLUS_EXPORT MPStatus MGPlusPathMovetoI (HPATH path, int x, int y);
02207
02223 MGPLUS_EXPORT MPStatus MGPlusPathLineto (HPATH path, float x, float y);
02224
02240 MGPLUS_EXPORT MPStatus MGPlusPathLinetoI (HPATH path, int x, int y);
02241
02263 MGPLUS_EXPORT MPStatus MGPlusPathBezierto (HPATH path, float x1, float y1,
02264 float x2, float y2, float x3, float y3);
02265
02287 MGPLUS_EXPORT MPStatus MGPlusPathBeziertoI (HPATH path, int x1, int y1,
02288 int x2, int y2, int x3, int y3);
02289
02309 MGPLUS_EXPORT MPStatus MGPlusPathQuadraticto (HPATH path, float x1,
02310 float y1, float x2, float y2);
02311
02331 MGPLUS_EXPORT MPStatus MGPlusPathQuadratictoI (HPATH path, int x1,
02332 int y1, int x2, int y2);
02333
02352 MGPLUS_EXPORT MPStatus MGPlusPathAddRectangle (HPATH path, float x, float y,
02353 float width, float height);
02354
02373 MGPLUS_EXPORT MPStatus MGPlusPathAddRectangleI (HPATH path, int x, int y,
02374 int width, int height);
02375
02395 MGPLUS_EXPORT MPStatus MGPlusPathAddEllipse (HPATH path, float cx, float cy,
02396 float rx, float ry, BOOL clockwise);
02397
02417 MGPLUS_EXPORT MPStatus MGPlusPathAddEllipseI (HPATH path, int cx, int cy,
02418 int rx, int ry, BOOL clockwise);
02419
02434 MGPLUS_EXPORT MPStatus MGPlusPathAddCurve (HPATH path, const MPPOINT* points,
02435 int count);
02436
02449 MGPLUS_EXPORT MPStatus MGPlusPathAddPath (HPATH path, HPATH add_path);
02450
02463 MGPLUS_EXPORT MPStatus MGPlusPathStartFigure (HPATH path);
02464
02477 MGPLUS_EXPORT MPStatus MGPlusPathCloseFigure (HPATH path);
02478
02490 MGPLUS_EXPORT MPStatus MGPlusPathRotateAroundPoint (HPATH path,
02491 const MPPOINT* pt, float angle);
02492
02502 MGPLUS_EXPORT MPStatus MGPlusPathSetTransform (HPATH path, MPMatrix* matrix);
02503
02515 MGPLUS_EXPORT MPStatus MGPlusPathGetTransform (HPATH path, MPMatrix* matrix);
02516
02525 MGPLUS_EXPORT MPStatus MGPlusPathResetTransform (HPATH path);
02526
02538 MGPLUS_EXPORT MPStatus MGPlusPathScale(HPATH path, float sx, float sy);
02539
02549 MGPLUS_EXPORT MPStatus MGPlusPathRotate (HPATH path, float angle);
02550
02561 MGPLUS_EXPORT MPStatus MGPlusPathTranslate(HPATH path, float dx, float dy);
02562
02586 MGPLUS_EXPORT HPEN MGPlusPenCreate (int width, ARGB rgba);
02587
02601 MGPLUS_EXPORT MPStatus MGPlusPenSetColor (HPEN pen, ARGB rgba);
02602
02616 MGPLUS_EXPORT MPStatus MGPlusPenSetJoinStyle (HPEN pen, LINE_JOIN_E line_join);
02617
02631 MGPLUS_EXPORT MPStatus MGPlusPenSetCapStyle (HPEN pen, LINE_CAP_E line_cap);
02632
02649 MGPLUS_EXPORT MPStatus MGPlusPenSetDashes (HPEN pen, int dash_phase,
02650 const unsigned char* dash_list, int dash_len);
02651
02665 MGPLUS_EXPORT MPStatus MGPlusPenSetWidth (HPEN pen, int width);
02666
02679 MGPLUS_EXPORT MPStatus MGPlusPenDelete (HPEN pen);
02680
02703 MGPLUS_EXPORT HBRUSH MGPlusBrushCreate (MPBrushType type);
02704
02717 MGPLUS_EXPORT MPStatus MGPlusBrushDelete (HBRUSH brush);
02718
02730 MGPLUS_EXPORT MPStatus MGPlusSetSolidBrushColor (HBRUSH brush, ARGB rgba);
02731
02743 MPStatus MGPlusGetSolidBrushColor (HBRUSH brush, ARGB* rgba);
02744
02758 MGPLUS_EXPORT MPStatus MGPlusSetTextureBrushImage (HBRUSH brush,
02759 BITMAP* bitmap);
02760
02776 MGPLUS_EXPORT MPStatus MGPlusSetPathGradientBrushCenterPoint (HBRUSH brush,
02777 MPPOINT* point);
02778
02793 MGPLUS_EXPORT MPStatus MGPlusSetPathGradientBrushCenterColor (HBRUSH brush,
02794 ARGB rgba);
02795
02811 MGPLUS_EXPORT MPStatus MGPlusSetPathGradientBrushSurroundColors (HBRUSH brush,
02812 ARGB* rgba, int count);
02813
02829 MGPLUS_EXPORT MPStatus MGPlusSetPathGradientBrushSurroundRect (HBRUSH brush,
02830 RECT* rect);
02831
02847 MGPLUS_EXPORT MPStatus MGPlusSetLinearGradientBrushMode (HBRUSH brush,
02848 MPLinearGradientMode mode);
02849
02863 MGPLUS_EXPORT MPStatus MGPlusGetLinearGradientBrushMode (HBRUSH brush,
02864 MPLinearGradientMode* mode);
02865
02879 MGPLUS_EXPORT MPStatus MGPlusSetLinearGradientBrushRect (HBRUSH brush, RECT* rect);
02880
02895 MGPLUS_EXPORT MPStatus MGPlusSetLinearGradientBrushColors (HBRUSH brush,
02896 ARGB* colors, int count);
02897
02914 MGPLUS_EXPORT MPStatus MGPlusSetLinearGradientBrushColorsEx (HBRUSH brush,
02915 ARGB* colors, int count, float* position);
02916
02917
02932 MGPLUS_EXPORT MPStatus MGPlusLinearGradientBrushGetColors (HBRUSH brush, ARGB* color,
02933 float* position);
02934
02947 MGPLUS_EXPORT int MGPlusLinearGradientBrushGetColorNumber (HBRUSH brush);
02948
02963 MGPLUS_EXPORT MPStatus MGPlusLinearGradientBrushAddColor (HBRUSH brush,
02964 ARGB color, float position);
02965
02993 MGPLUS_EXPORT HFONT MGPlusCreateFont (const char* font_name,
02994 unsigned face_index, MPGlyphRendering ren_type,
02995 unsigned int width, unsigned int height, BOOL flip_y);
02996
03007 MGPLUS_EXPORT MPStatus MGPlusDeleteFont (HFONT hfont);
03008
03021 MGPLUS_EXPORT HPATH MGPlusGetGlyphPath (int x, int y, LPGLYPHDATA lpdata);
03022
03037 MGPLUS_EXPORT MPStatus MGPlusGetGlyphOutline (HFONT hfont, unsigned uchar,
03038 LPGLYPHMETRICS lpgm, LPGLYPHDATA lpdata);
03039
03058 MGPLUS_EXPORT MPStatus MGPlusDrawGlyph (HGRAPHICS graphics, HFONT hfont,
03059 int x, int y, LPGLYPHDATA lpdata, ARGB color);
03060
03078 MGPLUS_EXPORT BOOL MGPlusRegisterFashionLFRDR (void);
03079
03087 MGPLUS_EXPORT BOOL MGPlusUnregisterFashionLFRDR (void);
03088
03089
03093 #ifdef __cplusplus
03094 }
03095 #endif
03096
03097 #endif