PageRenderTime 139ms CodeModel.GetById 18ms app.highlight 111ms RepoModel.GetById 1ms app.codeStats 1ms

/binding/win32/gdiplusflat.d

http://github.com/wilkie/djehuty
D | 2174 lines | 1387 code | 653 blank | 134 comment | 0 complexity | ee7b337f43cda86aeecc23afbe2d7f06 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1/*
   2 * gdiplusimaging.d
   3 *
   4 * This module implements GdiPlusImaging.h for D. The original copyright
   5 * info is given below.
   6 *
   7 * Author: Dave Wilkinson
   8 * Originated: November 25th, 2009
   9 *
  10 */
  11
  12module binding.win32.gdiplusflat;
  13
  14import binding.win32.windef;
  15import binding.win32.winbase;
  16import binding.win32.winnt;
  17import binding.win32.wingdi;
  18import binding.win32.guiddef;
  19import binding.win32.gdiplustypes;
  20import binding.win32.gdiplusenums;
  21import binding.win32.gdipluspixelformats;
  22import binding.win32.gdiplusgpstubs;
  23import binding.win32.gdiplusmetaheader;
  24import binding.win32.gdipluspixelformats;
  25import binding.win32.gdipluscolor;
  26import binding.win32.gdipluscolormatrix;
  27import binding.win32.gdiplusimaging;
  28import binding.win32.gdipluseffects;
  29import binding.win32.gdipluscachedbitmap;
  30
  31/**************************************************************************\
  32*
  33* Copyright (c) 1998-2001, Microsoft Corp.  All Rights Reserved.
  34*
  35* Module Name:
  36*
  37*   GdiplusFlat.h
  38*
  39* Abstract:
  40*
  41*   Private GDI+ header file.
  42*
  43\**************************************************************************/
  44
  45pragma(lib, "gdiplus.lib");
  46
  47extern(System):
  48
  49//----------------------------------------------------------------------------
  50// GraphicsPath APIs
  51//----------------------------------------------------------------------------
  52
  53GpStatus GdipCreatePath(GpFillMode brushMode, GpPath **path);
  54
  55GpStatus GdipCreatePath2(GpPointF*, BYTE*, INT, GpFillMode,
  56                                    GpPath **path);
  57
  58GpStatus GdipCreatePath2I(GpPoint*, BYTE*, INT, GpFillMode,
  59                                     GpPath **path);
  60
  61GpStatus GdipClonePath(GpPath* path, GpPath **clonePath);
  62
  63GpStatus GdipDeletePath(GpPath* path);
  64
  65GpStatus GdipResetPath(GpPath* path);
  66
  67GpStatus GdipGetPointCount(GpPath* path, INT* count);
  68
  69GpStatus GdipGetPathTypes(GpPath* path, BYTE* types, INT count);
  70
  71GpStatus GdipGetPathPoints(GpPath*, GpPointF* points, INT count);
  72
  73GpStatus GdipGetPathPointsI(GpPath*, GpPoint* points, INT count);
  74
  75GpStatus GdipGetPathFillMode(GpPath *path, GpFillMode *fillmode);
  76
  77GpStatus GdipSetPathFillMode(GpPath *path, GpFillMode fillmode);
  78
  79GpStatus GdipGetPathData(GpPath *path, GpPathData* pathData);
  80
  81GpStatus GdipStartPathFigure(GpPath *path);
  82
  83GpStatus GdipClosePathFigure(GpPath *path);
  84
  85GpStatus GdipClosePathFigures(GpPath *path);
  86
  87GpStatus GdipSetPathMarker(GpPath* path);
  88
  89GpStatus GdipClearPathMarkers(GpPath* path);
  90
  91GpStatus GdipReversePath(GpPath* path);
  92
  93GpStatus GdipGetPathLastPoint(GpPath* path, GpPointF* lastPoint);
  94
  95GpStatus GdipAddPathLine(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2);
  96
  97GpStatus GdipAddPathLine2(GpPath *path, GpPointF *points, INT count);
  98
  99GpStatus GdipAddPathArc(GpPath *path, REAL x, REAL y, REAL width, REAL height,
 100                        REAL startAngle, REAL sweepAngle);
 101
 102GpStatus GdipAddPathBezier(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2,
 103                           REAL x3, REAL y3, REAL x4, REAL y4);
 104
 105GpStatus GdipAddPathBeziers(GpPath *path, GpPointF *points, INT count);
 106
 107GpStatus GdipAddPathCurve(GpPath *path, GpPointF *points, INT count);
 108
 109GpStatus GdipAddPathCurve2(GpPath *path, GpPointF *points, INT count,
 110                           REAL tension);
 111
 112GpStatus GdipAddPathCurve3(GpPath *path, GpPointF *points, INT count,
 113                           INT offset, INT numberOfSegments, REAL tension);
 114
 115GpStatus GdipAddPathClosedCurve(GpPath *path, GpPointF *points, INT count);
 116
 117GpStatus GdipAddPathClosedCurve2(GpPath *path, GpPointF *points, INT count,
 118                                 REAL tension);
 119
 120GpStatus GdipAddPathRectangle(GpPath *path, REAL x, REAL y, REAL width, REAL height);
 121
 122GpStatus GdipAddPathRectangles(GpPath *path, GpRectF *rects, INT count);
 123
 124GpStatus GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width,
 125                            REAL height);
 126
 127GpStatus GdipAddPathPie(GpPath *path, REAL x, REAL y, REAL width, REAL height,
 128                        REAL startAngle, REAL sweepAngle);
 129
 130GpStatus GdipAddPathPolygon(GpPath *path, GpPointF *points, INT count);
 131
 132GpStatus GdipAddPathPath(GpPath *path, GpPath* addingPath, BOOL connect);
 133
 134GpStatus GdipAddPathString(GpPath *path, WCHAR *string,
 135                        INT length, GpFontFamily *family, INT style,
 136                        REAL emSize, RectF *layoutRect,
 137                        GpStringFormat *format);
 138
 139GpStatus GdipAddPathStringI(GpPath *path, WCHAR *string,
 140                        INT length, GpFontFamily *family, INT style,
 141                        REAL emSize, Rect *layoutRect,
 142                        GpStringFormat *format);
 143
 144GpStatus GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y2);
 145
 146GpStatus GdipAddPathLine2I(GpPath *path, GpPoint *points, INT count);
 147
 148GpStatus GdipAddPathArcI(GpPath *path, INT x, INT y, INT width, INT height,
 149                        REAL startAngle, REAL sweepAngle);
 150
 151GpStatus GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, INT y2,
 152                           INT x3, INT y3, INT x4, INT y4);
 153
 154GpStatus GdipAddPathBeziersI(GpPath *path, GpPoint *points, INT count);
 155
 156GpStatus GdipAddPathCurveI(GpPath *path, GpPoint *points, INT count);
 157
 158GpStatus GdipAddPathCurve2I(GpPath *path, GpPoint *points, INT count,
 159                           REAL tension);
 160
 161GpStatus GdipAddPathCurve3I(GpPath *path, GpPoint *points, INT count,
 162                           INT offset, INT numberOfSegments, REAL tension);
 163
 164GpStatus GdipAddPathClosedCurveI(GpPath *path, GpPoint *points, INT count);
 165
 166GpStatus GdipAddPathClosedCurve2I(GpPath *path, GpPoint *points, INT count,
 167                                 REAL tension);
 168
 169GpStatus GdipAddPathRectangleI(GpPath *path, INT x, INT y, INT width, INT height);
 170
 171GpStatus GdipAddPathRectanglesI(GpPath *path, GpRect *rects, INT count);
 172
 173GpStatus GdipAddPathEllipseI(GpPath *path, INT x, INT y, INT width, INT height);
 174
 175GpStatus GdipAddPathPieI(GpPath *path, INT x, INT y, INT width, INT height,
 176                        REAL startAngle, REAL sweepAngle);
 177
 178GpStatus GdipAddPathPolygonI(GpPath *path, GpPoint *points, INT count);
 179
 180GpStatus GdipFlattenPath(GpPath *path, GpMatrix* matrix, REAL flatness);
 181
 182GpStatus GdipWindingModeOutline(
 183    GpPath *path,
 184    GpMatrix *matrix,
 185    REAL flatness
 186);
 187
 188GpStatus GdipWidenPath(
 189    GpPath *nativePath,
 190    GpPen *pen,
 191    GpMatrix *matrix,
 192    REAL flatness
 193);
 194
 195GpStatus GdipWarpPath(GpPath *path, GpMatrix* matrix,
 196            GpPointF *points, INT count,
 197            REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight,
 198            WarpMode warpMode, REAL flatness);
 199
 200GpStatus GdipTransformPath(GpPath* path, GpMatrix* matrix);
 201
 202GpStatus GdipGetPathWorldBounds(GpPath* path, GpRectF* bounds,
 203                       GpMatrix *matrix, GpPen *pen);
 204
 205GpStatus GdipGetPathWorldBoundsI(GpPath* path, GpRect* bounds,
 206                        GpMatrix *matrix, GpPen *pen);
 207
 208GpStatus GdipIsVisiblePathPoint(GpPath* path, REAL x, REAL y,
 209                       GpGraphics *graphics, BOOL *result);
 210
 211GpStatus GdipIsVisiblePathPointI(GpPath* path, INT x, INT y,
 212                        GpGraphics *graphics, BOOL *result);
 213
 214GpStatus GdipIsOutlineVisiblePathPoint(GpPath* path, REAL x, REAL y, GpPen *pen,
 215                              GpGraphics *graphics, BOOL *result);
 216
 217GpStatus GdipIsOutlineVisiblePathPointI(GpPath* path, INT x, INT y, GpPen *pen,
 218                               GpGraphics *graphics, BOOL *result);
 219
 220
 221//----------------------------------------------------------------------------
 222// PathIterator APIs
 223//----------------------------------------------------------------------------
 224
 225GpStatus GdipCreatePathIter(GpPathIterator **iterator, GpPath* path);
 226
 227GpStatus GdipDeletePathIter(GpPathIterator *iterator);
 228
 229GpStatus GdipPathIterNextSubpath(GpPathIterator* iterator, INT *resultCount,
 230        INT* startIndex, INT* endIndex, BOOL* isClosed);
 231
 232GpStatus GdipPathIterNextSubpathPath(GpPathIterator* iterator, INT* resultCount,
 233        GpPath* path, BOOL* isClosed);
 234
 235GpStatus GdipPathIterNextPathType(GpPathIterator* iterator, INT* resultCount,
 236        BYTE* pathType, INT* startIndex, INT* endIndex);
 237
 238GpStatus GdipPathIterNextMarker(GpPathIterator* iterator, INT *resultCount,
 239        INT* startIndex, INT* endIndex);
 240
 241GpStatus GdipPathIterNextMarkerPath(GpPathIterator* iterator, INT* resultCount,
 242        GpPath* path);
 243
 244GpStatus GdipPathIterGetCount(GpPathIterator* iterator, INT* count);
 245
 246GpStatus GdipPathIterGetSubpathCount(GpPathIterator* iterator, INT* count);
 247
 248GpStatus GdipPathIterIsValid(GpPathIterator* iterator, BOOL* valid);
 249
 250GpStatus GdipPathIterHasCurve(GpPathIterator* iterator, BOOL* hasCurve);
 251
 252GpStatus GdipPathIterRewind(GpPathIterator* iterator);
 253
 254GpStatus GdipPathIterEnumerate(GpPathIterator* iterator, INT* resultCount,
 255    GpPointF *points, BYTE *types, INT count);
 256
 257GpStatus GdipPathIterCopyData(GpPathIterator* iterator, INT* resultCount,
 258    GpPointF* points, BYTE* types, INT startIndex, INT endIndex);
 259
 260//----------------------------------------------------------------------------
 261// Matrix APIs
 262//----------------------------------------------------------------------------
 263
 264GpStatus GdipCreateMatrix(GpMatrix **matrix);
 265
 266GpStatus GdipCreateMatrix2(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx,
 267                                      REAL dy, GpMatrix **matrix);
 268
 269GpStatus GdipCreateMatrix3(GpRectF *rect, GpPointF *dstplg,
 270                                      GpMatrix **matrix);
 271
 272GpStatus GdipCreateMatrix3I(GpRect *rect, GpPoint *dstplg,
 273                                       GpMatrix **matrix);
 274
 275GpStatus GdipCloneMatrix(GpMatrix *matrix, GpMatrix **cloneMatrix);
 276
 277GpStatus GdipDeleteMatrix(GpMatrix *matrix);
 278
 279GpStatus GdipSetMatrixElements(GpMatrix *matrix, REAL m11, REAL m12, REAL m21, REAL m22,
 280                      REAL dx, REAL dy);
 281
 282GpStatus GdipMultiplyMatrix(GpMatrix *matrix, GpMatrix* matrix2,
 283                            GpMatrixOrder order);
 284
 285GpStatus GdipTranslateMatrix(GpMatrix *matrix, REAL offsetX, REAL offsetY,
 286                    GpMatrixOrder order);
 287
 288GpStatus GdipScaleMatrix(GpMatrix *matrix, REAL scaleX, REAL scaleY,
 289                GpMatrixOrder order);
 290
 291GpStatus GdipRotateMatrix(GpMatrix *matrix, REAL angle, GpMatrixOrder order);
 292
 293GpStatus GdipShearMatrix(GpMatrix *matrix, REAL shearX, REAL shearY,
 294                GpMatrixOrder order);
 295
 296GpStatus GdipInvertMatrix(GpMatrix *matrix);
 297
 298GpStatus GdipTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, INT count);
 299
 300GpStatus GdipTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts, INT count);
 301
 302GpStatus GdipVectorTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts,
 303                                         INT count);
 304
 305GpStatus GdipVectorTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts,
 306                                         INT count);
 307
 308GpStatus GdipGetMatrixElements(GpMatrix *matrix, REAL *matrixOut);
 309
 310GpStatus GdipIsMatrixInvertible(GpMatrix *matrix, BOOL *result);
 311
 312GpStatus GdipIsMatrixIdentity(GpMatrix *matrix, BOOL *result);
 313
 314GpStatus GdipIsMatrixEqual(GpMatrix *matrix, GpMatrix *matrix2,
 315                  BOOL *result);
 316
 317//----------------------------------------------------------------------------
 318// Region APIs
 319//----------------------------------------------------------------------------
 320
 321GpStatus GdipCreateRegion(GpRegion **region);
 322
 323GpStatus GdipCreateRegionRect(GpRectF *rect, GpRegion **region);
 324
 325GpStatus GdipCreateRegionRectI(GpRect *rect, GpRegion **region);
 326
 327GpStatus GdipCreateRegionPath(GpPath *path, GpRegion **region);
 328
 329GpStatus GdipCreateRegionRgnData(BYTE *regionData, INT size,
 330                        GpRegion **region);
 331
 332GpStatus GdipCreateRegionHrgn(HRGN hRgn, GpRegion **region);
 333
 334GpStatus GdipCloneRegion(GpRegion *region, GpRegion **cloneRegion);
 335
 336GpStatus GdipDeleteRegion(GpRegion *region);
 337
 338GpStatus GdipSetInfinite(GpRegion *region);
 339
 340GpStatus GdipSetEmpty(GpRegion *region);
 341
 342GpStatus GdipCombineRegionRect(GpRegion *region, GpRectF *rect,
 343                      CombineMode combineMode);
 344
 345GpStatus GdipCombineRegionRectI(GpRegion *region, GpRect *rect,
 346                       CombineMode combineMode);
 347
 348GpStatus GdipCombineRegionPath(GpRegion *region, GpPath *path, CombineMode combineMode);
 349
 350GpStatus GdipCombineRegionRegion(GpRegion *region,  GpRegion *region2,
 351                        CombineMode combineMode);
 352
 353GpStatus GdipTranslateRegion(GpRegion *region, REAL dx, REAL dy);
 354
 355GpStatus GdipTranslateRegionI(GpRegion *region, INT dx, INT dy);
 356
 357GpStatus GdipTransformRegion(GpRegion *region, GpMatrix *matrix);
 358
 359GpStatus GdipGetRegionBounds(GpRegion *region, GpGraphics *graphics,
 360                             GpRectF *rect);
 361
 362GpStatus GdipGetRegionBoundsI(GpRegion *region, GpGraphics *graphics,
 363                             GpRect *rect);
 364
 365GpStatus GdipGetRegionHRgn(GpRegion *region, GpGraphics *graphics, HRGN *hRgn);
 366
 367GpStatus GdipIsEmptyRegion(GpRegion *region, GpGraphics *graphics,
 368                           BOOL *result);
 369
 370GpStatus GdipIsInfiniteRegion(GpRegion *region, GpGraphics *graphics,
 371                              BOOL *result);
 372
 373GpStatus GdipIsEqualRegion(GpRegion *region, GpRegion *region2,
 374                           GpGraphics *graphics, BOOL *result);
 375
 376GpStatus GdipGetRegionDataSize(GpRegion *region, UINT * bufferSize);
 377
 378GpStatus GdipGetRegionData(GpRegion *region, BYTE * buffer, UINT bufferSize,
 379                  UINT * sizeFilled);
 380
 381GpStatus GdipIsVisibleRegionPoint(GpRegion *region, REAL x, REAL y,
 382                                  GpGraphics *graphics, BOOL *result);
 383
 384GpStatus GdipIsVisibleRegionPointI(GpRegion *region, INT x, INT y,
 385                                  GpGraphics *graphics, BOOL *result);
 386
 387GpStatus GdipIsVisibleRegionRect(GpRegion *region, REAL x, REAL y, REAL width,
 388                        REAL height, GpGraphics *graphics, BOOL *result);
 389
 390GpStatus GdipIsVisibleRegionRectI(GpRegion *region, INT x, INT y, INT width,
 391                         INT height, GpGraphics *graphics, BOOL *result);
 392
 393GpStatus GdipGetRegionScansCount(GpRegion *region, UINT* count, GpMatrix* matrix);
 394
 395GpStatus GdipGetRegionScans(GpRegion *region, GpRectF* rects, INT* count,
 396                   GpMatrix* matrix);
 397
 398GpStatus GdipGetRegionScansI(GpRegion *region, GpRect* rects, INT* count,
 399                    GpMatrix* matrix);
 400
 401//----------------------------------------------------------------------------
 402// Brush APIs
 403//----------------------------------------------------------------------------
 404
 405GpStatus GdipCloneBrush(GpBrush *brush, GpBrush **cloneBrush);
 406
 407GpStatus GdipDeleteBrush(GpBrush *brush);
 408
 409GpStatus GdipGetBrushType(GpBrush *brush, GpBrushType *type);
 410
 411//----------------------------------------------------------------------------
 412// HatchBrush APIs
 413//----------------------------------------------------------------------------
 414
 415GpStatus GdipCreateHatchBrush(GpHatchStyle hatchstyle, ARGB forecol,
 416                              ARGB backcol, GpHatch **brush);
 417
 418GpStatus GdipGetHatchStyle(GpHatch *brush, GpHatchStyle *hatchstyle);
 419
 420GpStatus GdipGetHatchForegroundColor(GpHatch *brush, ARGB* forecol);
 421
 422GpStatus GdipGetHatchBackgroundColor(GpHatch *brush, ARGB* backcol);
 423
 424//----------------------------------------------------------------------------
 425// TextureBrush APIs
 426//----------------------------------------------------------------------------
 427
 428GpStatus GdipCreateTexture(GpImage *image, GpWrapMode wrapmode,
 429                           GpTexture **texture);
 430
 431GpStatus GdipCreateTexture2(GpImage *image, GpWrapMode wrapmode, REAL x,
 432                   REAL y, REAL width, REAL height, GpTexture **texture);
 433
 434GpStatus GdipCreateTextureIA(GpImage *image,
 435                    GpImageAttributes *imageAttributes,
 436                    REAL x, REAL y, REAL width, REAL height,
 437                    GpTexture **texture);
 438
 439GpStatus GdipCreateTexture2I(GpImage *image, GpWrapMode wrapmode, INT x,
 440                    INT y, INT width, INT height, GpTexture **texture);
 441
 442GpStatus GdipCreateTextureIAI(GpImage *image,
 443                     GpImageAttributes *imageAttributes,
 444                     INT x, INT y, INT width, INT height,
 445                     GpTexture **texture);
 446
 447
 448GpStatus GdipGetTextureTransform(GpTexture *brush, GpMatrix *matrix);
 449
 450GpStatus GdipSetTextureTransform(GpTexture *brush, GpMatrix *matrix);
 451
 452GpStatus GdipResetTextureTransform(GpTexture* brush);
 453
 454GpStatus GdipMultiplyTextureTransform(GpTexture* brush, GpMatrix *matrix,
 455                            GpMatrixOrder order);
 456
 457GpStatus GdipTranslateTextureTransform(GpTexture* brush, REAL dx, REAL dy,
 458                            GpMatrixOrder order);
 459
 460GpStatus GdipScaleTextureTransform(GpTexture* brush, REAL sx, REAL sy,
 461                            GpMatrixOrder order);
 462
 463GpStatus GdipRotateTextureTransform(GpTexture* brush, REAL angle, GpMatrixOrder order);
 464
 465GpStatus GdipSetTextureWrapMode(GpTexture *brush, GpWrapMode wrapmode);
 466
 467GpStatus GdipGetTextureWrapMode(GpTexture *brush, GpWrapMode *wrapmode);
 468
 469GpStatus GdipGetTextureImage(GpTexture *brush, GpImage **image);
 470
 471//----------------------------------------------------------------------------
 472// SolidBrush APIs
 473//----------------------------------------------------------------------------
 474
 475GpStatus GdipCreateSolidFill(ARGB color, GpSolidFill **brush);
 476
 477GpStatus GdipSetSolidFillColor(GpSolidFill *brush, ARGB color);
 478
 479GpStatus GdipGetSolidFillColor(GpSolidFill *brush, ARGB *color);
 480
 481//----------------------------------------------------------------------------
 482// LineBrush APIs
 483//----------------------------------------------------------------------------
 484
 485GpStatus GdipCreateLineBrush(GpPointF* point1,
 486                    GpPointF* point2,
 487                    ARGB color1, ARGB color2,
 488                    GpWrapMode wrapMode,
 489                    GpLineGradient **lineGradient);
 490
 491GpStatus GdipCreateLineBrushI(GpPoint* point1,
 492                     GpPoint* point2,
 493                     ARGB color1, ARGB color2,
 494                     GpWrapMode wrapMode,
 495                     GpLineGradient **lineGradient);
 496
 497GpStatus GdipCreateLineBrushFromRect(GpRectF* rect,
 498                            ARGB color1, ARGB color2,
 499                            LinearGradientMode mode,
 500                            GpWrapMode wrapMode,
 501                            GpLineGradient **lineGradient);
 502
 503GpStatus GdipCreateLineBrushFromRectI(GpRect* rect,
 504                             ARGB color1, ARGB color2,
 505                             LinearGradientMode mode,
 506                             GpWrapMode wrapMode,
 507                             GpLineGradient **lineGradient);
 508
 509GpStatus GdipCreateLineBrushFromRectWithAngle(GpRectF* rect,
 510                                     ARGB color1, ARGB color2,
 511                                     REAL angle,
 512                                     BOOL isAngleScalable,
 513                                     GpWrapMode wrapMode,
 514                                     GpLineGradient **lineGradient);
 515
 516GpStatus GdipCreateLineBrushFromRectWithAngleI(GpRect* rect,
 517                                     ARGB color1, ARGB color2,
 518                                     REAL angle,
 519                                     BOOL isAngleScalable,
 520                                     GpWrapMode wrapMode,
 521                                     GpLineGradient **lineGradient);
 522
 523GpStatus GdipSetLineColors(GpLineGradient *brush, ARGB color1, ARGB color2);
 524
 525GpStatus GdipGetLineColors(GpLineGradient *brush, ARGB* colors);
 526
 527GpStatus GdipGetLineRect(GpLineGradient *brush, GpRectF *rect);
 528
 529GpStatus GdipGetLineRectI(GpLineGradient *brush, GpRect *rect);
 530
 531GpStatus GdipSetLineGammaCorrection(GpLineGradient *brush, BOOL useGammaCorrection);
 532
 533GpStatus GdipGetLineGammaCorrection(GpLineGradient *brush, BOOL *useGammaCorrection);
 534
 535GpStatus GdipGetLineBlendCount(GpLineGradient *brush, INT *count);
 536
 537GpStatus GdipGetLineBlend(GpLineGradient *brush, REAL *blend, REAL* positions,
 538                 INT count);
 539
 540GpStatus GdipSetLineBlend(GpLineGradient *brush, REAL *blend,
 541                 REAL* positions, INT count);
 542
 543GpStatus GdipGetLinePresetBlendCount(GpLineGradient *brush, INT *count);
 544
 545GpStatus GdipGetLinePresetBlend(GpLineGradient *brush, ARGB *blend,
 546                                           REAL* positions, INT count);
 547
 548GpStatus GdipSetLinePresetBlend(GpLineGradient *brush, ARGB *blend,
 549                       REAL* positions, INT count);
 550
 551GpStatus GdipSetLineSigmaBlend(GpLineGradient *brush, REAL focus, REAL scale);
 552
 553GpStatus GdipSetLineLinearBlend(GpLineGradient *brush, REAL focus, REAL scale);
 554
 555GpStatus GdipSetLineWrapMode(GpLineGradient *brush, GpWrapMode wrapmode);
 556
 557GpStatus GdipGetLineWrapMode(GpLineGradient *brush, GpWrapMode *wrapmode);
 558
 559GpStatus GdipGetLineTransform(GpLineGradient *brush, GpMatrix *matrix);
 560
 561GpStatus GdipSetLineTransform(GpLineGradient *brush, GpMatrix *matrix);
 562
 563GpStatus GdipResetLineTransform(GpLineGradient* brush);
 564
 565GpStatus GdipMultiplyLineTransform(GpLineGradient* brush, GpMatrix *matrix,
 566                            GpMatrixOrder order);
 567
 568GpStatus GdipTranslateLineTransform(GpLineGradient* brush, REAL dx, REAL dy,
 569                            GpMatrixOrder order);
 570
 571GpStatus GdipScaleLineTransform(GpLineGradient* brush, REAL sx, REAL sy,
 572                            GpMatrixOrder order);
 573
 574GpStatus GdipRotateLineTransform(GpLineGradient* brush, REAL angle,
 575                        GpMatrixOrder order);
 576
 577//----------------------------------------------------------------------------
 578// PathGradientBrush APIs
 579//----------------------------------------------------------------------------
 580
 581GpStatus GdipCreatePathGradient(GpPointF* points,
 582                                    INT count,
 583                                    GpWrapMode wrapMode,
 584                                    GpPathGradient **polyGradient);
 585
 586GpStatus GdipCreatePathGradientI(GpPoint* points,
 587                                    INT count,
 588                                    GpWrapMode wrapMode,
 589                                    GpPathGradient **polyGradient);
 590
 591GpStatus GdipCreatePathGradientFromPath(GpPath* path,
 592                                    GpPathGradient **polyGradient);
 593
 594GpStatus GdipGetPathGradientCenterColor(
 595                        GpPathGradient *brush, ARGB* colors);
 596
 597GpStatus GdipSetPathGradientCenterColor(
 598                        GpPathGradient *brush, ARGB colors);
 599
 600GpStatus GdipGetPathGradientSurroundColorsWithCount(
 601                        GpPathGradient *brush, ARGB* color, INT* count);
 602
 603GpStatus GdipSetPathGradientSurroundColorsWithCount(
 604                        GpPathGradient *brush,
 605                        ARGB* color, INT* count);
 606
 607GpStatus GdipGetPathGradientPath(GpPathGradient *brush, GpPath *path);
 608
 609GpStatus GdipSetPathGradientPath(GpPathGradient *brush, GpPath *path);
 610
 611GpStatus GdipGetPathGradientCenterPoint(
 612                        GpPathGradient *brush, GpPointF* points);
 613
 614GpStatus GdipGetPathGradientCenterPointI(
 615                        GpPathGradient *brush, GpPoint* points);
 616
 617GpStatus GdipSetPathGradientCenterPoint(
 618                        GpPathGradient *brush, GpPointF* points);
 619
 620GpStatus GdipSetPathGradientCenterPointI(
 621                        GpPathGradient *brush, GpPoint* points);
 622
 623GpStatus GdipGetPathGradientRect(GpPathGradient *brush, GpRectF *rect);
 624
 625GpStatus GdipGetPathGradientRectI(GpPathGradient *brush, GpRect *rect);
 626
 627GpStatus GdipGetPathGradientPointCount(GpPathGradient *brush, INT* count);
 628
 629GpStatus GdipGetPathGradientSurroundColorCount(GpPathGradient *brush, INT* count);
 630
 631GpStatus GdipSetPathGradientGammaCorrection(GpPathGradient *brush,
 632                                   BOOL useGammaCorrection);
 633
 634GpStatus GdipGetPathGradientGammaCorrection(GpPathGradient *brush,
 635                                   BOOL *useGammaCorrection);
 636
 637GpStatus GdipGetPathGradientBlendCount(GpPathGradient *brush,
 638                                             INT *count);
 639
 640GpStatus GdipGetPathGradientBlend(GpPathGradient *brush,
 641                                    REAL *blend, REAL *positions, INT count);
 642
 643GpStatus GdipSetPathGradientBlend(GpPathGradient *brush,
 644                REAL *blend, REAL *positions, INT count);
 645
 646GpStatus GdipGetPathGradientPresetBlendCount(GpPathGradient *brush, INT *count);
 647
 648GpStatus GdipGetPathGradientPresetBlend(GpPathGradient *brush, ARGB *blend,
 649                                                REAL* positions, INT count);
 650
 651GpStatus GdipSetPathGradientPresetBlend(GpPathGradient *brush, ARGB *blend,
 652                                        REAL* positions, INT count);
 653
 654GpStatus GdipSetPathGradientSigmaBlend(GpPathGradient *brush, REAL focus, REAL scale);
 655
 656GpStatus GdipSetPathGradientLinearBlend(GpPathGradient *brush, REAL focus, REAL scale);
 657
 658GpStatus GdipGetPathGradientWrapMode(GpPathGradient *brush,
 659                                         GpWrapMode *wrapmode);
 660
 661GpStatus GdipSetPathGradientWrapMode(GpPathGradient *brush,
 662                                         GpWrapMode wrapmode);
 663
 664GpStatus GdipGetPathGradientTransform(GpPathGradient *brush,
 665                                          GpMatrix *matrix);
 666
 667GpStatus GdipSetPathGradientTransform(GpPathGradient *brush,
 668                                          GpMatrix *matrix);
 669
 670GpStatus GdipResetPathGradientTransform(GpPathGradient* brush);
 671
 672GpStatus GdipMultiplyPathGradientTransform(GpPathGradient* brush,
 673                                  GpMatrix *matrix,
 674                                  GpMatrixOrder order);
 675
 676GpStatus GdipTranslatePathGradientTransform(GpPathGradient* brush, REAL dx, REAL dy,
 677                                   GpMatrixOrder order);
 678
 679GpStatus GdipScalePathGradientTransform(GpPathGradient* brush, REAL sx, REAL sy,
 680                               GpMatrixOrder order);
 681
 682GpStatus GdipRotatePathGradientTransform(GpPathGradient* brush, REAL angle,
 683                                GpMatrixOrder order);
 684
 685GpStatus GdipGetPathGradientFocusScales(GpPathGradient *brush, REAL* xScale,
 686                               REAL* yScale);
 687
 688GpStatus GdipSetPathGradientFocusScales(GpPathGradient *brush, REAL xScale,
 689                               REAL yScale);
 690
 691//----------------------------------------------------------------------------
 692// Pen APIs
 693//----------------------------------------------------------------------------
 694
 695GpStatus GdipCreatePen1(ARGB color, REAL width, GpUnit unit, GpPen **pen);
 696
 697GpStatus GdipCreatePen2(GpBrush *brush, REAL width, GpUnit unit,
 698                        GpPen **pen);
 699
 700GpStatus GdipClonePen(GpPen *pen, GpPen **clonepen);
 701
 702GpStatus GdipDeletePen(GpPen *pen);
 703
 704GpStatus GdipSetPenWidth(GpPen *pen, REAL width);
 705
 706GpStatus GdipGetPenWidth(GpPen *pen, REAL *width);
 707
 708GpStatus GdipSetPenUnit(GpPen *pen, GpUnit unit);
 709
 710GpStatus GdipGetPenUnit(GpPen *pen, GpUnit *unit);
 711
 712GpStatus GdipSetPenLineCap197819(GpPen *pen, GpLineCap startCap, GpLineCap endCap,
 713                  GpDashCap dashCap);
 714
 715GpStatus GdipSetPenStartCap(GpPen *pen, GpLineCap startCap);
 716
 717GpStatus GdipSetPenEndCap(GpPen *pen, GpLineCap endCap);
 718
 719GpStatus GdipSetPenDashCap197819(GpPen *pen, GpDashCap dashCap);
 720
 721GpStatus GdipGetPenStartCap(GpPen *pen, GpLineCap *startCap);
 722
 723GpStatus GdipGetPenEndCap(GpPen *pen, GpLineCap *endCap);
 724
 725GpStatus GdipGetPenDashCap197819(GpPen *pen, GpDashCap *dashCap);
 726
 727GpStatus GdipSetPenLineJoin(GpPen *pen, GpLineJoin lineJoin);
 728
 729GpStatus GdipGetPenLineJoin(GpPen *pen, GpLineJoin *lineJoin);
 730
 731GpStatus GdipSetPenCustomStartCap(GpPen *pen, GpCustomLineCap* customCap);
 732
 733GpStatus GdipGetPenCustomStartCap(GpPen *pen, GpCustomLineCap** customCap);
 734
 735GpStatus GdipSetPenCustomEndCap(GpPen *pen, GpCustomLineCap* customCap);
 736
 737GpStatus GdipGetPenCustomEndCap(GpPen *pen, GpCustomLineCap** customCap);
 738
 739GpStatus GdipSetPenMiterLimit(GpPen *pen, REAL miterLimit);
 740
 741GpStatus GdipGetPenMiterLimit(GpPen *pen, REAL *miterLimit);
 742
 743GpStatus GdipSetPenMode(GpPen *pen, GpPenAlignment penMode);
 744
 745GpStatus GdipGetPenMode(GpPen *pen, GpPenAlignment *penMode);
 746
 747GpStatus GdipSetPenTransform(GpPen *pen, GpMatrix *matrix);
 748
 749GpStatus GdipGetPenTransform(GpPen *pen, GpMatrix *matrix);
 750
 751GpStatus GdipResetPenTransform(GpPen *pen);
 752
 753GpStatus GdipMultiplyPenTransform(GpPen *pen, GpMatrix *matrix,
 754                           GpMatrixOrder order);
 755
 756GpStatus GdipTranslatePenTransform(GpPen *pen, REAL dx, REAL dy,
 757                            GpMatrixOrder order);
 758
 759GpStatus GdipScalePenTransform(GpPen *pen, REAL sx, REAL sy,
 760                            GpMatrixOrder order);
 761
 762GpStatus GdipRotatePenTransform(GpPen *pen, REAL angle, GpMatrixOrder order);
 763
 764GpStatus GdipSetPenColor(GpPen *pen, ARGB argb);
 765
 766GpStatus GdipGetPenColor(GpPen *pen, ARGB *argb);
 767
 768GpStatus GdipSetPenBrushFill(GpPen *pen, GpBrush *brush);
 769
 770GpStatus GdipGetPenBrushFill(GpPen *pen, GpBrush **brush);
 771
 772GpStatus GdipGetPenFillType(GpPen *pen, GpPenType* type);
 773
 774GpStatus GdipGetPenDashStyle(GpPen *pen, GpDashStyle *dashstyle);
 775
 776GpStatus GdipSetPenDashStyle(GpPen *pen, GpDashStyle dashstyle);
 777
 778GpStatus GdipGetPenDashOffset(GpPen *pen, REAL *offset);
 779
 780GpStatus GdipSetPenDashOffset(GpPen *pen, REAL offset);
 781
 782GpStatus GdipGetPenDashCount(GpPen *pen, INT *count);
 783
 784GpStatus GdipSetPenDashArray(GpPen *pen, REAL *dash, INT count);
 785
 786GpStatus GdipGetPenDashArray(GpPen *pen, REAL *dash, INT count);
 787
 788GpStatus GdipGetPenCompoundCount(GpPen *pen, INT *count);
 789
 790GpStatus GdipSetPenCompoundArray(GpPen *pen, REAL *dash, INT count);
 791
 792GpStatus GdipGetPenCompoundArray(GpPen *pen, REAL *dash, INT count);
 793
 794//----------------------------------------------------------------------------
 795// CustomLineCap APIs
 796//----------------------------------------------------------------------------
 797
 798GpStatus GdipCreateCustomLineCap(GpPath* fillPath, GpPath* strokePath,
 799   GpLineCap baseCap, REAL baseInset, GpCustomLineCap **customCap);
 800
 801GpStatus GdipDeleteCustomLineCap(GpCustomLineCap* customCap);
 802
 803GpStatus GdipCloneCustomLineCap(GpCustomLineCap* customCap,
 804                       GpCustomLineCap** clonedCap);
 805
 806GpStatus GdipGetCustomLineCapType(GpCustomLineCap* customCap,
 807                       CustomLineCapType* capType);
 808
 809GpStatus GdipSetCustomLineCapStrokeCaps(GpCustomLineCap* customCap,
 810                               GpLineCap startCap, GpLineCap endCap);
 811
 812GpStatus GdipGetCustomLineCapStrokeCaps(GpCustomLineCap* customCap,
 813                               GpLineCap* startCap, GpLineCap* endCap);
 814
 815GpStatus GdipSetCustomLineCapStrokeJoin(GpCustomLineCap* customCap,
 816                               GpLineJoin lineJoin);
 817
 818GpStatus GdipGetCustomLineCapStrokeJoin(GpCustomLineCap* customCap,
 819                               GpLineJoin* lineJoin);
 820
 821GpStatus GdipSetCustomLineCapBaseCap(GpCustomLineCap* customCap, GpLineCap baseCap);
 822
 823GpStatus GdipGetCustomLineCapBaseCap(GpCustomLineCap* customCap, GpLineCap* baseCap);
 824
 825GpStatus GdipSetCustomLineCapBaseInset(GpCustomLineCap* customCap, REAL inset);
 826
 827GpStatus GdipGetCustomLineCapBaseInset(GpCustomLineCap* customCap, REAL* inset);
 828
 829GpStatus GdipSetCustomLineCapWidthScale(GpCustomLineCap* customCap, REAL widthScale);
 830
 831GpStatus GdipGetCustomLineCapWidthScale(GpCustomLineCap* customCap, REAL* widthScale);
 832
 833//----------------------------------------------------------------------------
 834// AdjustableArrowCap APIs
 835//----------------------------------------------------------------------------
 836
 837GpStatus GdipCreateAdjustableArrowCap(REAL height, REAL width, BOOL isFilled,
 838                             GpAdjustableArrowCap **cap);
 839
 840GpStatus GdipSetAdjustableArrowCapHeight(GpAdjustableArrowCap* cap, REAL height);
 841
 842GpStatus GdipGetAdjustableArrowCapHeight(GpAdjustableArrowCap* cap, REAL* height);
 843
 844GpStatus GdipSetAdjustableArrowCapWidth(GpAdjustableArrowCap* cap, REAL width);
 845
 846GpStatus GdipGetAdjustableArrowCapWidth(GpAdjustableArrowCap* cap, REAL* width);
 847
 848GpStatus GdipSetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap* cap,
 849                                     REAL middleInset);
 850
 851GpStatus GdipGetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap* cap,
 852                                     REAL* middleInset);
 853
 854GpStatus GdipSetAdjustableArrowCapFillState(GpAdjustableArrowCap* cap, BOOL fillState);
 855
 856GpStatus GdipGetAdjustableArrowCapFillState(GpAdjustableArrowCap* cap, BOOL* fillState);
 857
 858//----------------------------------------------------------------------------
 859// Image APIs
 860//----------------------------------------------------------------------------
 861
 862//GpStatus GdipLoadImageFromStream(IStream* stream, GpImage **image);
 863
 864GpStatus GdipLoadImageFromFile(WCHAR* filename, GpImage **image);
 865
 866//GpStatus GdipLoadImageFromStreamICM(IStream* stream, GpImage **image);
 867
 868GpStatus GdipLoadImageFromFileICM(WCHAR* filename, GpImage **image);
 869
 870GpStatus GdipCloneImage(GpImage *image, GpImage **cloneImage);
 871
 872GpStatus GdipDisposeImage(GpImage *image);
 873
 874GpStatus GdipSaveImageToFile(GpImage *image, WCHAR* filename,
 875                    CLSID* clsidEncoder,
 876                    EncoderParameters* encoderParams);
 877
 878//GpStatus GdipSaveImageToStream(GpImage *image, IStream* stream,
 879//                      CLSID* clsidEncoder,
 880//                      EncoderParameters* encoderParams);
 881
 882GpStatus GdipSaveAdd(GpImage *image, EncoderParameters* encoderParams);
 883
 884GpStatus GdipSaveAddImage(GpImage *image, GpImage* newImage,
 885                 EncoderParameters* encoderParams);
 886
 887GpStatus GdipGetImageGraphicsContext(GpImage *image, GpGraphics **graphics);
 888
 889GpStatus GdipGetImageBounds(GpImage *image, GpRectF *srcRect, GpUnit *srcUnit);
 890
 891GpStatus GdipGetImageDimension(GpImage *image, REAL *width, REAL *height);
 892
 893GpStatus GdipGetImageType(GpImage *image, ImageType *type);
 894
 895GpStatus GdipGetImageWidth(GpImage *image, UINT *width);
 896
 897GpStatus GdipGetImageHeight(GpImage *image, UINT *height);
 898
 899GpStatus GdipGetImageHorizontalResolution(GpImage *image, REAL *resolution);
 900
 901GpStatus GdipGetImageVerticalResolution(GpImage *image, REAL *resolution);
 902
 903GpStatus GdipGetImageFlags(GpImage *image, UINT *flags);
 904
 905GpStatus GdipGetImageRawFormat(GpImage *image, GUID *format);
 906
 907GpStatus GdipGetImagePixelFormat(GpImage *image, PixelFormat *format);
 908
 909GpStatus GdipGetImageThumbnail(GpImage *image, UINT thumbWidth, UINT thumbHeight,
 910                      GpImage **thumbImage,
 911                      GetThumbnailImageAbort callback, VOID * callbackData);
 912
 913GpStatus GdipGetEncoderParameterListSize(GpImage *image, CLSID* clsidEncoder,
 914                                UINT* size);
 915
 916GpStatus GdipGetEncoderParameterList(GpImage *image, CLSID* clsidEncoder,
 917                            UINT size, EncoderParameters* buffer);
 918
 919GpStatus GdipImageGetFrameDimensionsCount(GpImage* image, UINT* count);
 920
 921GpStatus GdipImageGetFrameDimensionsList(GpImage* image, GUID* dimensionIDs,
 922                                UINT count);
 923
 924GpStatus GdipImageGetFrameCount(GpImage *image, GUID* dimensionID,
 925                       UINT* count);
 926
 927GpStatus GdipImageSelectActiveFrame(GpImage *image, GUID* dimensionID,
 928                           UINT frameIndex);
 929
 930GpStatus GdipImageRotateFlip(GpImage *image, RotateFlipType rfType);
 931
 932GpStatus GdipGetImagePalette(GpImage *image, ColorPalette *palette, INT size);
 933
 934GpStatus GdipSetImagePalette(GpImage *image, ColorPalette *palette);
 935
 936GpStatus GdipGetImagePaletteSize(GpImage *image, INT *size);
 937
 938GpStatus GdipGetPropertyCount(GpImage *image, UINT* numOfProperty);
 939
 940GpStatus GdipGetPropertyIdList(GpImage *image, UINT numOfProperty, PROPID* list);
 941
 942GpStatus GdipGetPropertyItemSize(GpImage *image, PROPID propId, UINT* size);
 943
 944GpStatus GdipGetPropertyItem(GpImage *image, PROPID propId,UINT propSize,
 945                    PropertyItem* buffer);
 946
 947GpStatus GdipGetPropertySize(GpImage *image, UINT* totalBufferSize,
 948                    UINT* numProperties);
 949
 950GpStatus GdipGetAllPropertyItems(GpImage *image, UINT totalBufferSize,
 951                        UINT numProperties, PropertyItem* allItems);
 952
 953GpStatus GdipRemovePropertyItem(GpImage *image, PROPID propId);
 954
 955GpStatus GdipSetPropertyItem(GpImage *image, PropertyItem* item);
 956
 957version(GDIPLUS6) {
 958GpStatus GdipFindFirstImageItem(GpImage *image, ImageItemData* item);
 959
 960GpStatus GdipFindNextImageItem(GpImage *image, ImageItemData* item);
 961
 962GpStatus GdipGetImageItemData(GpImage *image, ImageItemData* item);
 963}
 964
 965GpStatus GdipImageForceValidation(GpImage *image);
 966
 967//----------------------------------------------------------------------------
 968// Bitmap APIs
 969//----------------------------------------------------------------------------
 970
 971//GpStatus GdipCreateBitmapFromStream(IStream* stream, GpBitmap **bitmap);
 972
 973GpStatus GdipCreateBitmapFromFile(WCHAR* filename, GpBitmap **bitmap);
 974
 975//GpStatus GdipCreateBitmapFromStreamICM(IStream* stream, GpBitmap **bitmap);
 976
 977GpStatus GdipCreateBitmapFromFileICM(WCHAR* filename, GpBitmap **bitmap);
 978
 979GpStatus GdipCreateBitmapFromScan0(INT width,
 980                          INT height,
 981                          INT stride,
 982                          PixelFormat format,
 983                          BYTE* scan0,
 984                          GpBitmap** bitmap);
 985
 986GpStatus GdipCreateBitmapFromGraphics(INT width,
 987                             INT height,
 988                             GpGraphics* target,
 989                             GpBitmap** bitmap);
 990
 991GpStatus GdipCreateBitmapFromDirectDrawSurface(IDirectDrawSurface7* surface,
 992                                      GpBitmap** bitmap);
 993
 994GpStatus GdipCreateBitmapFromGdiDib(BITMAPINFO* gdiBitmapInfo,
 995                           VOID* gdiBitmapData,
 996                           GpBitmap** bitmap);
 997
 998GpStatus GdipCreateBitmapFromHBITMAP(HBITMAP hbm,
 999                            HPALETTE hpal,
1000                            GpBitmap** bitmap);
1001
1002GpStatus GdipCreateHBITMAPFromBitmap(GpBitmap* bitmap,
1003                            HBITMAP* hbmReturn,
1004                            ARGB background);
1005
1006GpStatus GdipCreateBitmapFromHICON(HICON hicon,
1007                          GpBitmap** bitmap);
1008
1009GpStatus GdipCreateHICONFromBitmap(GpBitmap* bitmap,
1010                          HICON* hbmReturn);
1011
1012GpStatus GdipCreateBitmapFromResource(HINSTANCE hInstance,
1013                             WCHAR* lpBitmapName,
1014                             GpBitmap** bitmap);
1015
1016GpStatus GdipCloneBitmapArea(REAL x, REAL y, REAL width, REAL height,
1017                            PixelFormat format,
1018                            GpBitmap *srcBitmap,
1019                            GpBitmap **dstBitmap);
1020
1021GpStatus GdipCloneBitmapAreaI(INT x,
1022                     INT y,
1023                     INT width,
1024                     INT height,
1025                     PixelFormat format,
1026                     GpBitmap *srcBitmap,
1027                     GpBitmap **dstBitmap);
1028
1029GpStatus GdipBitmapLockBits(GpBitmap* bitmap,
1030                   GpRect* rect,
1031                   UINT flags,
1032                   PixelFormat format,
1033                   BitmapData* lockedBitmapData);
1034
1035GpStatus GdipBitmapUnlockBits(GpBitmap* bitmap,
1036                     BitmapData* lockedBitmapData);
1037
1038GpStatus GdipBitmapGetPixel(GpBitmap* bitmap, INT x, INT y, ARGB *color);
1039
1040GpStatus GdipBitmapSetPixel(GpBitmap* bitmap, INT x, INT y, ARGB color);
1041
1042version(GDIPLUS6) {
1043GpStatus GdipImageSetAbort(
1044    GpImage *pImage,
1045    GdiplusAbort *pIAbort
1046    );
1047
1048GpStatus GdipGraphicsSetAbort(
1049    GpGraphics *pGraphics,
1050    GdiplusAbort *pIAbort
1051    );
1052
1053GpStatus GdipBitmapConvertFormat(
1054    GpBitmap *pInputBitmap,
1055    PixelFormat format,
1056    DitherType dithertype,
1057    PaletteType palettetype,
1058    ColorPalette *palette,
1059    REAL alphaThresholdPercent
1060    );
1061
1062GpStatus GdipInitializePalette(
1063    ColorPalette *palette,   // output palette. must be allocated.
1064    PaletteType palettetype,     // palette enumeration type.
1065    INT optimalColors,           // how many optimal colors
1066    BOOL useTransparentColor,    // add a transparent color to the palette.
1067    GpBitmap *bitmap             // optional bitmap for median cut.
1068    );
1069
1070GpStatus GdipBitmapApplyEffect(
1071    GpBitmap* bitmap,
1072    CGpEffect *effect,
1073    RECT *roi,
1074    BOOL useAuxData,
1075    VOID **auxData,
1076    INT *auxDataSize
1077    );
1078
1079GpStatus GdipBitmapCreateApplyEffect(
1080    GpBitmap **inputBitmaps,
1081    INT numInputs,
1082    CGpEffect *effect,
1083    RECT *roi,
1084    RECT *outputRect,
1085    GpBitmap **outputBitmap,
1086    BOOL useAuxData,
1087    VOID **auxData,
1088    INT *auxDataSize
1089);
1090
1091GpStatus GdipBitmapGetHistogram(
1092    GpBitmap* bitmap,
1093    HistogramFormat format,
1094    UINT NumberOfEntries,
1095    UINT *channel0,
1096    UINT *channel1,
1097    UINT *channel2,
1098    UINT *channel3
1099);
1100
1101GpStatus GdipBitmapGetHistogramSize(
1102    HistogramFormat format,
1103    UINT *NumberOfEntries
1104);
1105}
1106
1107GpStatus GdipBitmapSetResolution(GpBitmap* bitmap, REAL xdpi, REAL ydpi);
1108
1109//----------------------------------------------------------------------------
1110// ImageAttributes APIs
1111//----------------------------------------------------------------------------
1112
1113GpStatus GdipCreateImageAttributes(GpImageAttributes **imageattr);
1114
1115GpStatus GdipCloneImageAttributes(GpImageAttributes *imageattr,
1116                         GpImageAttributes **cloneImageattr);
1117
1118GpStatus GdipDisposeImageAttributes(GpImageAttributes *imageattr);
1119
1120GpStatus GdipSetImageAttributesToIdentity(GpImageAttributes *imageattr,
1121                                 ColorAdjustType type);
1122GpStatus GdipResetImageAttributes(GpImageAttributes *imageattr,
1123                         ColorAdjustType type);
1124
1125GpStatus GdipSetImageAttributesColorMatrix(GpImageAttributes *imageattr,
1126                               ColorAdjustType type,
1127                               BOOL enableFlag,
1128                               ColorMatrix* colorMatrix,
1129                               ColorMatrix* grayMatrix,
1130                               ColorMatrixFlags flags);
1131
1132GpStatus GdipSetImageAttributesThreshold(GpImageAttributes *imageattr,
1133                                ColorAdjustType type,
1134                                BOOL enableFlag,
1135                                REAL threshold);
1136
1137GpStatus GdipSetImageAttributesGamma(GpImageAttributes *imageattr,
1138                            ColorAdjustType type,
1139                            BOOL enableFlag,
1140                            REAL gamma);
1141
1142GpStatus GdipSetImageAttributesNoOp(GpImageAttributes *imageattr,
1143                           ColorAdjustType type,
1144                           BOOL enableFlag);
1145
1146GpStatus GdipSetImageAttributesColorKeys(GpImageAttributes *imageattr,
1147                                ColorAdjustType type,
1148                                BOOL enableFlag,
1149                                ARGB colorLow,
1150                                ARGB colorHigh);
1151
1152GpStatus GdipSetImageAttributesOutputChannel(GpImageAttributes *imageattr,
1153                                    ColorAdjustType type,
1154                                    BOOL enableFlag,
1155                                    ColorChannelFlags channelFlags);
1156
1157GpStatus GdipSetImageAttributesOutputChannelColorProfile(GpImageAttributes *imageattr,
1158                                                ColorAdjustType type,
1159                                                BOOL enableFlag,
1160                                                  WCHAR *colorProfileFilename);
1161
1162GpStatus GdipSetImageAttributesRemapTable(GpImageAttributes *imageattr,
1163                                 ColorAdjustType type,
1164                                 BOOL enableFlag,
1165                                 UINT mapSize,
1166                                 ColorMap *map);
1167GpStatus GdipSetImageAttributesWrapMode(
1168    GpImageAttributes *imageAttr,
1169    WrapMode wrap,
1170    ARGB argb,
1171    BOOL clamp
1172);
1173
1174GpStatus GdipSetImageAttributesICMMode(
1175    GpImageAttributes *imageAttr,
1176    BOOL on
1177);
1178
1179GpStatus GdipGetImageAttributesAdjustedPalette(
1180    GpImageAttributes *imageAttr,
1181    ColorPalette * colorPalette,
1182    ColorAdjustType colorAdjustType
1183);
1184
1185//----------------------------------------------------------------------------
1186// Graphics APIs
1187//----------------------------------------------------------------------------
1188
1189GpStatus GdipFlush(GpGraphics *graphics, GpFlushIntention intention);
1190
1191GpStatus GdipCreateFromHDC(HDC hdc, GpGraphics **graphics);
1192
1193GpStatus GdipCreateFromHDC2(HDC hdc, HANDLE hDevice, GpGraphics **graphics);
1194
1195GpStatus GdipCreateFromHWND(HWND hwnd, GpGraphics **graphics);
1196
1197GpStatus GdipCreateFromHWNDICM(HWND hwnd, GpGraphics **graphics);
1198
1199GpStatus GdipDeleteGraphics(GpGraphics *graphics);
1200
1201GpStatus GdipGetDC(GpGraphics* graphics, HDC * hdc);
1202
1203GpStatus GdipReleaseDC(GpGraphics* graphics, HDC hdc);
1204
1205GpStatus GdipSetCompositingMode(GpGraphics *graphics, CompositingMode compositingMode);
1206
1207GpStatus GdipGetCompositingMode(GpGraphics *graphics, CompositingMode *compositingMode);
1208
1209GpStatus GdipSetRenderingOrigin(GpGraphics *graphics, INT x, INT y);
1210
1211GpStatus GdipGetRenderingOrigin(GpGraphics *graphics, INT *x, INT *y);
1212
1213GpStatus GdipSetCompositingQuality(GpGraphics *graphics,
1214                          CompositingQuality compositingQuality);
1215
1216GpStatus GdipGetCompositingQuality(GpGraphics *graphics,
1217                          CompositingQuality *compositingQuality);
1218
1219GpStatus GdipSetSmoothingMode(GpGraphics *graphics, SmoothingMode smoothingMode);
1220
1221GpStatus GdipGetSmoothingMode(GpGraphics *graphics, SmoothingMode *smoothingMode);
1222
1223GpStatus GdipSetPixelOffsetMode(GpGraphics* graphics, PixelOffsetMode pixelOffsetMode);
1224
1225GpStatus GdipGetPixelOffsetMode(GpGraphics *graphics, PixelOffsetMode *pixelOffsetMode);
1226
1227GpStatus GdipSetTextRenderingHint(GpGraphics *graphics, TextRenderingHint mode);
1228
1229GpStatus GdipGetTextRenderingHint(GpGraphics *graphics, TextRenderingHint *mode);
1230
1231GpStatus GdipSetTextContrast(GpGraphics *graphics, UINT contrast);
1232
1233GpStatus GdipGetTextContrast(GpGraphics *graphics, UINT * contrast);
1234
1235GpStatus GdipSetInterpolationMode(GpGraphics *graphics,
1236                         InterpolationMode interpolationMode);
1237
1238GpStatus GdipGetInterpolationMode(GpGraphics *graphics,
1239                         InterpolationMode *interpolationMode);
1240
1241GpStatus GdipSetWorldTransform(GpGraphics *graphics, GpMatrix *matrix);
1242
1243GpStatus GdipResetWorldTransform(GpGraphics *graphics);
1244
1245GpStatus GdipMultiplyWorldTransform(GpGraphics *graphics, GpMatrix *matrix,
1246                           GpMatrixOrder order);
1247
1248GpStatus GdipTranslateWorldTransform(GpGraphics *graphics, REAL dx, REAL dy,
1249                            GpMatrixOrder order);
1250
1251GpStatus GdipScaleWorldTransform(GpGraphics *graphics, REAL sx, REAL sy,
1252                        GpMatrixOrder order);
1253
1254GpStatus GdipRotateWorldTransform(GpGraphics *graphics, REAL angle,
1255                         GpMatrixOrder order);
1256
1257GpStatus GdipGetWorldTransform(GpGraphics *graphics, GpMatrix *matrix);
1258
1259GpStatus GdipResetPageTransform(GpGraphics *graphics);
1260
1261GpStatus GdipGetPageUnit(GpGraphics *graphics, GpUnit *unit);
1262
1263GpStatus GdipGetPageScale(GpGraphics *graphics, REAL *scale);
1264
1265GpStatus GdipSetPageUnit(GpGraphics *graphics, GpUnit unit);
1266
1267GpStatus GdipSetPageScale(GpGraphics *graphics, REAL scale);
1268
1269GpStatus GdipGetDpiX(GpGraphics *graphics, REAL* dpi);
1270
1271GpStatus GdipGetDpiY(GpGraphics *graphics, REAL* dpi);
1272
1273GpStatus GdipTransformPoints(GpGraphics *graphics, GpCoordinateSpace destSpace,
1274                             GpCoordinateSpace srcSpace, GpPointF *points,
1275                             INT count);
1276
1277GpStatus GdipTransformPointsI(GpGraphics *graphics, GpCoordinateSpace destSpace,
1278                             GpCoordinateSpace srcSpace, GpPoint *points,
1279                             INT count);
1280
1281GpStatus GdipGetNearestColor(GpGraphics *graphics, ARGB* argb);
1282
1283// Creates the Win9x Halftone Palette (even on NT) with correct Desktop colors
1284HPALETTE GdipCreateHalftonePalette();
1285
1286GpStatus GdipDrawLine(GpGraphics *graphics, GpPen *pen, REAL x1, REAL y1,
1287                      REAL x2, REAL y2);
1288
1289GpStatus GdipDrawLineI(GpGraphics *graphics, GpPen *pen, INT x1, INT y1,
1290                      INT x2, INT y2);
1291
1292GpStatus GdipDrawLines(GpGraphics *graphics, GpPen *pen, GpPointF *points,
1293                       INT count);
1294
1295GpStatus GdipDrawLinesI(GpGraphics *graphics, GpPen *pen, GpPoint *points,
1296                       INT count);
1297
1298GpStatus GdipDrawArc(GpGraphics *graphics, GpPen *pen, REAL x, REAL y,
1299            REAL width, REAL height, REAL startAngle, REAL sweepAngle);
1300
1301GpStatus GdipDrawArcI(GpGraphics *graphics, GpPen *pen, INT x, INT y,
1302                     INT width, INT height, REAL startAngle, REAL sweepAngle);
1303
1304GpStatus GdipDrawBezier(GpGraphics *graphics, GpPen *pen, REAL x1, REAL y1,
1305                        REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4);
1306
1307GpStatus GdipDrawBezierI(GpGraphics *graphics, GpPen *pen, INT x1, INT y1,
1308                        INT x2, INT y2, INT x3, INT y3, INT x4, INT y4);
1309
1310GpStatus GdipDrawBeziers(GpGraphics *graphics, GpPen *pen, GpPointF *points,
1311                         INT count);
1312
1313GpStatus GdipDrawBeziersI(GpGraphics *graphics, GpPen *pen, GpPoint *points,
1314                         INT count);
1315
1316GpStatus GdipDrawRectangle(GpGraphics *graphics, GpPen *pen, REAL x, REAL y,
1317                      REAL width, REAL height);
1318
1319GpStatus GdipDrawRectangleI(GpGraphics *graphics, GpPen *pen, INT x, INT y,
1320                      INT width, INT height);
1321
1322GpStatus GdipDrawRectangles(GpGraphics *graphics, GpPen *pen, GpRectF *rects,
1323                       INT count);
1324
1325GpStatus GdipDrawRectanglesI(GpGraphics *graphics, GpPen *pen, GpRect *rects,
1326                       INT count);
1327
1328GpStatus GdipDrawEllipse(GpGraphics *graphics, GpPen *pen, REAL x, REAL y,
1329                         REAL width, REAL height);
1330
1331GpStatus GdipDrawEllipseI(GpGraphics *graphics, GpPen *pen, INT x, INT y,
1332                         INT width, INT height);
1333
1334GpStatus GdipDrawPie(GpGraphics *graphics, GpPen *pen, REAL x, REAL y,
1335                     REAL width, REAL height, REAL startAngle,
1336            REAL sweepAngle);
1337
1338GpStatus GdipDrawPieI(GpGraphics *graphics, GpPen *pen, INT x, INT y,
1339                     INT width, INT height, REAL startAngle, REAL sweepAngle);
1340
1341GpStatus GdipDrawPolygon(GpGraphics *graphics, GpPen *pen, GpPointF *points,
1342                         INT count);
1343
1344GpStatus GdipDrawPolygonI(GpGraphics *graphics, GpPen *pen, GpPoint *points,
1345                         INT count);
1346
1347GpStatus GdipDrawPath(GpGraphics *graphics, GpPen *pen, GpPath *path);
1348
1349GpSt

Large files files are truncated, but you can click here to view the full file