/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 are truncated 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. module binding.win32.gdiplusflat;
  12. import binding.win32.windef;
  13. import binding.win32.winbase;
  14. import binding.win32.winnt;
  15. import binding.win32.wingdi;
  16. import binding.win32.guiddef;
  17. import binding.win32.gdiplustypes;
  18. import binding.win32.gdiplusenums;
  19. import binding.win32.gdipluspixelformats;
  20. import binding.win32.gdiplusgpstubs;
  21. import binding.win32.gdiplusmetaheader;
  22. import binding.win32.gdipluspixelformats;
  23. import binding.win32.gdipluscolor;
  24. import binding.win32.gdipluscolormatrix;
  25. import binding.win32.gdiplusimaging;
  26. import binding.win32.gdipluseffects;
  27. import binding.win32.gdipluscachedbitmap;
  28. /**************************************************************************\
  29. *
  30. * Copyright (c) 1998-2001, Microsoft Corp. All Rights Reserved.
  31. *
  32. * Module Name:
  33. *
  34. * GdiplusFlat.h
  35. *
  36. * Abstract:
  37. *
  38. * Private GDI+ header file.
  39. *
  40. \**************************************************************************/
  41. pragma(lib, "gdiplus.lib");
  42. extern(System):
  43. //----------------------------------------------------------------------------
  44. // GraphicsPath APIs
  45. //----------------------------------------------------------------------------
  46. GpStatus GdipCreatePath(GpFillMode brushMode, GpPath **path);
  47. GpStatus GdipCreatePath2(GpPointF*, BYTE*, INT, GpFillMode,
  48. GpPath **path);
  49. GpStatus GdipCreatePath2I(GpPoint*, BYTE*, INT, GpFillMode,
  50. GpPath **path);
  51. GpStatus GdipClonePath(GpPath* path, GpPath **clonePath);
  52. GpStatus GdipDeletePath(GpPath* path);
  53. GpStatus GdipResetPath(GpPath* path);
  54. GpStatus GdipGetPointCount(GpPath* path, INT* count);
  55. GpStatus GdipGetPathTypes(GpPath* path, BYTE* types, INT count);
  56. GpStatus GdipGetPathPoints(GpPath*, GpPointF* points, INT count);
  57. GpStatus GdipGetPathPointsI(GpPath*, GpPoint* points, INT count);
  58. GpStatus GdipGetPathFillMode(GpPath *path, GpFillMode *fillmode);
  59. GpStatus GdipSetPathFillMode(GpPath *path, GpFillMode fillmode);
  60. GpStatus GdipGetPathData(GpPath *path, GpPathData* pathData);
  61. GpStatus GdipStartPathFigure(GpPath *path);
  62. GpStatus GdipClosePathFigure(GpPath *path);
  63. GpStatus GdipClosePathFigures(GpPath *path);
  64. GpStatus GdipSetPathMarker(GpPath* path);
  65. GpStatus GdipClearPathMarkers(GpPath* path);
  66. GpStatus GdipReversePath(GpPath* path);
  67. GpStatus GdipGetPathLastPoint(GpPath* path, GpPointF* lastPoint);
  68. GpStatus GdipAddPathLine(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2);
  69. GpStatus GdipAddPathLine2(GpPath *path, GpPointF *points, INT count);
  70. GpStatus GdipAddPathArc(GpPath *path, REAL x, REAL y, REAL width, REAL height,
  71. REAL startAngle, REAL sweepAngle);
  72. GpStatus GdipAddPathBezier(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2,
  73. REAL x3, REAL y3, REAL x4, REAL y4);
  74. GpStatus GdipAddPathBeziers(GpPath *path, GpPointF *points, INT count);
  75. GpStatus GdipAddPathCurve(GpPath *path, GpPointF *points, INT count);
  76. GpStatus GdipAddPathCurve2(GpPath *path, GpPointF *points, INT count,
  77. REAL tension);
  78. GpStatus GdipAddPathCurve3(GpPath *path, GpPointF *points, INT count,
  79. INT offset, INT numberOfSegments, REAL tension);
  80. GpStatus GdipAddPathClosedCurve(GpPath *path, GpPointF *points, INT count);
  81. GpStatus GdipAddPathClosedCurve2(GpPath *path, GpPointF *points, INT count,
  82. REAL tension);
  83. GpStatus GdipAddPathRectangle(GpPath *path, REAL x, REAL y, REAL width, REAL height);
  84. GpStatus GdipAddPathRectangles(GpPath *path, GpRectF *rects, INT count);
  85. GpStatus GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width,
  86. REAL height);
  87. GpStatus GdipAddPathPie(GpPath *path, REAL x, REAL y, REAL width, REAL height,
  88. REAL startAngle, REAL sweepAngle);
  89. GpStatus GdipAddPathPolygon(GpPath *path, GpPointF *points, INT count);
  90. GpStatus GdipAddPathPath(GpPath *path, GpPath* addingPath, BOOL connect);
  91. GpStatus GdipAddPathString(GpPath *path, WCHAR *string,
  92. INT length, GpFontFamily *family, INT style,
  93. REAL emSize, RectF *layoutRect,
  94. GpStringFormat *format);
  95. GpStatus GdipAddPathStringI(GpPath *path, WCHAR *string,
  96. INT length, GpFontFamily *family, INT style,
  97. REAL emSize, Rect *layoutRect,
  98. GpStringFormat *format);
  99. GpStatus GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y2);
  100. GpStatus GdipAddPathLine2I(GpPath *path, GpPoint *points, INT count);
  101. GpStatus GdipAddPathArcI(GpPath *path, INT x, INT y, INT width, INT height,
  102. REAL startAngle, REAL sweepAngle);
  103. GpStatus GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, INT y2,
  104. INT x3, INT y3, INT x4, INT y4);
  105. GpStatus GdipAddPathBeziersI(GpPath *path, GpPoint *points, INT count);
  106. GpStatus GdipAddPathCurveI(GpPath *path, GpPoint *points, INT count);
  107. GpStatus GdipAddPathCurve2I(GpPath *path, GpPoint *points, INT count,
  108. REAL tension);
  109. GpStatus GdipAddPathCurve3I(GpPath *path, GpPoint *points, INT count,
  110. INT offset, INT numberOfSegments, REAL tension);
  111. GpStatus GdipAddPathClosedCurveI(GpPath *path, GpPoint *points, INT count);
  112. GpStatus GdipAddPathClosedCurve2I(GpPath *path, GpPoint *points, INT count,
  113. REAL tension);
  114. GpStatus GdipAddPathRectangleI(GpPath *path, INT x, INT y, INT width, INT height);
  115. GpStatus GdipAddPathRectanglesI(GpPath *path, GpRect *rects, INT count);
  116. GpStatus GdipAddPathEllipseI(GpPath *path, INT x, INT y, INT width, INT height);
  117. GpStatus GdipAddPathPieI(GpPath *path, INT x, INT y, INT width, INT height,
  118. REAL startAngle, REAL sweepAngle);
  119. GpStatus GdipAddPathPolygonI(GpPath *path, GpPoint *points, INT count);
  120. GpStatus GdipFlattenPath(GpPath *path, GpMatrix* matrix, REAL flatness);
  121. GpStatus GdipWindingModeOutline(
  122. GpPath *path,
  123. GpMatrix *matrix,
  124. REAL flatness
  125. );
  126. GpStatus GdipWidenPath(
  127. GpPath *nativePath,
  128. GpPen *pen,
  129. GpMatrix *matrix,
  130. REAL flatness
  131. );
  132. GpStatus GdipWarpPath(GpPath *path, GpMatrix* matrix,
  133. GpPointF *points, INT count,
  134. REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight,
  135. WarpMode warpMode, REAL flatness);
  136. GpStatus GdipTransformPath(GpPath* path, GpMatrix* matrix);
  137. GpStatus GdipGetPathWorldBounds(GpPath* path, GpRectF* bounds,
  138. GpMatrix *matrix, GpPen *pen);
  139. GpStatus GdipGetPathWorldBoundsI(GpPath* path, GpRect* bounds,
  140. GpMatrix *matrix, GpPen *pen);
  141. GpStatus GdipIsVisiblePathPoint(GpPath* path, REAL x, REAL y,
  142. GpGraphics *graphics, BOOL *result);
  143. GpStatus GdipIsVisiblePathPointI(GpPath* path, INT x, INT y,
  144. GpGraphics *graphics, BOOL *result);
  145. GpStatus GdipIsOutlineVisiblePathPoint(GpPath* path, REAL x, REAL y, GpPen *pen,
  146. GpGraphics *graphics, BOOL *result);
  147. GpStatus GdipIsOutlineVisiblePathPointI(GpPath* path, INT x, INT y, GpPen *pen,
  148. GpGraphics *graphics, BOOL *result);
  149. //----------------------------------------------------------------------------
  150. // PathIterator APIs
  151. //----------------------------------------------------------------------------
  152. GpStatus GdipCreatePathIter(GpPathIterator **iterator, GpPath* path);
  153. GpStatus GdipDeletePathIter(GpPathIterator *iterator);
  154. GpStatus GdipPathIterNextSubpath(GpPathIterator* iterator, INT *resultCount,
  155. INT* startIndex, INT* endIndex, BOOL* isClosed);
  156. GpStatus GdipPathIterNextSubpathPath(GpPathIterator* iterator, INT* resultCount,
  157. GpPath* path, BOOL* isClosed);
  158. GpStatus GdipPathIterNextPathType(GpPathIterator* iterator, INT* resultCount,
  159. BYTE* pathType, INT* startIndex, INT* endIndex);
  160. GpStatus GdipPathIterNextMarker(GpPathIterator* iterator, INT *resultCount,
  161. INT* startIndex, INT* endIndex);
  162. GpStatus GdipPathIterNextMarkerPath(GpPathIterator* iterator, INT* resultCount,
  163. GpPath* path);
  164. GpStatus GdipPathIterGetCount(GpPathIterator* iterator, INT* count);
  165. GpStatus GdipPathIterGetSubpathCount(GpPathIterator* iterator, INT* count);
  166. GpStatus GdipPathIterIsValid(GpPathIterator* iterator, BOOL* valid);
  167. GpStatus GdipPathIterHasCurve(GpPathIterator* iterator, BOOL* hasCurve);
  168. GpStatus GdipPathIterRewind(GpPathIterator* iterator);
  169. GpStatus GdipPathIterEnumerate(GpPathIterator* iterator, INT* resultCount,
  170. GpPointF *points, BYTE *types, INT count);
  171. GpStatus GdipPathIterCopyData(GpPathIterator* iterator, INT* resultCount,
  172. GpPointF* points, BYTE* types, INT startIndex, INT endIndex);
  173. //----------------------------------------------------------------------------
  174. // Matrix APIs
  175. //----------------------------------------------------------------------------
  176. GpStatus GdipCreateMatrix(GpMatrix **matrix);
  177. GpStatus GdipCreateMatrix2(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx,
  178. REAL dy, GpMatrix **matrix);
  179. GpStatus GdipCreateMatrix3(GpRectF *rect, GpPointF *dstplg,
  180. GpMatrix **matrix);
  181. GpStatus GdipCreateMatrix3I(GpRect *rect, GpPoint *dstplg,
  182. GpMatrix **matrix);
  183. GpStatus GdipCloneMatrix(GpMatrix *matrix, GpMatrix **cloneMatrix);
  184. GpStatus GdipDeleteMatrix(GpMatrix *matrix);
  185. GpStatus GdipSetMatrixElements(GpMatrix *matrix, REAL m11, REAL m12, REAL m21, REAL m22,
  186. REAL dx, REAL dy);
  187. GpStatus GdipMultiplyMatrix(GpMatrix *matrix, GpMatrix* matrix2,
  188. GpMatrixOrder order);
  189. GpStatus GdipTranslateMatrix(GpMatrix *matrix, REAL offsetX, REAL offsetY,
  190. GpMatrixOrder order);
  191. GpStatus GdipScaleMatrix(GpMatrix *matrix, REAL scaleX, REAL scaleY,
  192. GpMatrixOrder order);
  193. GpStatus GdipRotateMatrix(GpMatrix *matrix, REAL angle, GpMatrixOrder order);
  194. GpStatus GdipShearMatrix(GpMatrix *matrix, REAL shearX, REAL shearY,
  195. GpMatrixOrder order);
  196. GpStatus GdipInvertMatrix(GpMatrix *matrix);
  197. GpStatus GdipTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, INT count);
  198. GpStatus GdipTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts, INT count);
  199. GpStatus GdipVectorTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts,
  200. INT count);
  201. GpStatus GdipVectorTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts,
  202. INT count);
  203. GpStatus GdipGetMatrixElements(GpMatrix *matrix, REAL *matrixOut);
  204. GpStatus GdipIsMatrixInvertible(GpMatrix *matrix, BOOL *result);
  205. GpStatus GdipIsMatrixIdentity(GpMatrix *matrix, BOOL *result);
  206. GpStatus GdipIsMatrixEqual(GpMatrix *matrix, GpMatrix *matrix2,
  207. BOOL *result);
  208. //----------------------------------------------------------------------------
  209. // Region APIs
  210. //----------------------------------------------------------------------------
  211. GpStatus GdipCreateRegion(GpRegion **region);
  212. GpStatus GdipCreateRegionRect(GpRectF *rect, GpRegion **region);
  213. GpStatus GdipCreateRegionRectI(GpRect *rect, GpRegion **region);
  214. GpStatus GdipCreateRegionPath(GpPath *path, GpRegion **region);
  215. GpStatus GdipCreateRegionRgnData(BYTE *regionData, INT size,
  216. GpRegion **region);
  217. GpStatus GdipCreateRegionHrgn(HRGN hRgn, GpRegion **region);
  218. GpStatus GdipCloneRegion(GpRegion *region, GpRegion **cloneRegion);
  219. GpStatus GdipDeleteRegion(GpRegion *region);
  220. GpStatus GdipSetInfinite(GpRegion *region);
  221. GpStatus GdipSetEmpty(GpRegion *region);
  222. GpStatus GdipCombineRegionRect(GpRegion *region, GpRectF *rect,
  223. CombineMode combineMode);
  224. GpStatus GdipCombineRegionRectI(GpRegion *region, GpRect *rect,
  225. CombineMode combineMode);
  226. GpStatus GdipCombineRegionPath(GpRegion *region, GpPath *path, CombineMode combineMode);
  227. GpStatus GdipCombineRegionRegion(GpRegion *region, GpRegion *region2,
  228. CombineMode combineMode);
  229. GpStatus GdipTranslateRegion(GpRegion *region, REAL dx, REAL dy);
  230. GpStatus GdipTranslateRegionI(GpRegion *region, INT dx, INT dy);
  231. GpStatus GdipTransformRegion(GpRegion *region, GpMatrix *matrix);
  232. GpStatus GdipGetRegionBounds(GpRegion *region, GpGraphics *graphics,
  233. GpRectF *rect);
  234. GpStatus GdipGetRegionBoundsI(GpRegion *region, GpGraphics *graphics,
  235. GpRect *rect);
  236. GpStatus GdipGetRegionHRgn(GpRegion *region, GpGraphics *graphics, HRGN *hRgn);
  237. GpStatus GdipIsEmptyRegion(GpRegion *region, GpGraphics *graphics,
  238. BOOL *result);
  239. GpStatus GdipIsInfiniteRegion(GpRegion *region, GpGraphics *graphics,
  240. BOOL *result);
  241. GpStatus GdipIsEqualRegion(GpRegion *region, GpRegion *region2,
  242. GpGraphics *graphics, BOOL *result);
  243. GpStatus GdipGetRegionDataSize(GpRegion *region, UINT * bufferSize);
  244. GpStatus GdipGetRegionData(GpRegion *region, BYTE * buffer, UINT bufferSize,
  245. UINT * sizeFilled);
  246. GpStatus GdipIsVisibleRegionPoint(GpRegion *region, REAL x, REAL y,
  247. GpGraphics *graphics, BOOL *result);
  248. GpStatus GdipIsVisibleRegionPointI(GpRegion *region, INT x, INT y,
  249. GpGraphics *graphics, BOOL *result);
  250. GpStatus GdipIsVisibleRegionRect(GpRegion *region, REAL x, REAL y, REAL width,
  251. REAL height, GpGraphics *graphics, BOOL *result);
  252. GpStatus GdipIsVisibleRegionRectI(GpRegion *region, INT x, INT y, INT width,
  253. INT height, GpGraphics *graphics, BOOL *result);
  254. GpStatus GdipGetRegionScansCount(GpRegion *region, UINT* count, GpMatrix* matrix);
  255. GpStatus GdipGetRegionScans(GpRegion *region, GpRectF* rects, INT* count,
  256. GpMatrix* matrix);
  257. GpStatus GdipGetRegionScansI(GpRegion *region, GpRect* rects, INT* count,
  258. GpMatrix* matrix);
  259. //----------------------------------------------------------------------------
  260. // Brush APIs
  261. //----------------------------------------------------------------------------
  262. GpStatus GdipCloneBrush(GpBrush *brush, GpBrush **cloneBrush);
  263. GpStatus GdipDeleteBrush(GpBrush *brush);
  264. GpStatus GdipGetBrushType(GpBrush *brush, GpBrushType *type);
  265. //----------------------------------------------------------------------------
  266. // HatchBrush APIs
  267. //----------------------------------------------------------------------------
  268. GpStatus GdipCreateHatchBrush(GpHatchStyle hatchstyle, ARGB forecol,
  269. ARGB backcol, GpHatch **brush);
  270. GpStatus GdipGetHatchStyle(GpHatch *brush, GpHatchStyle *hatchstyle);
  271. GpStatus GdipGetHatchForegroundColor(GpHatch *brush, ARGB* forecol);
  272. GpStatus GdipGetHatchBackgroundColor(GpHatch *brush, ARGB* backcol);
  273. //----------------------------------------------------------------------------
  274. // TextureBrush APIs
  275. //----------------------------------------------------------------------------
  276. GpStatus GdipCreateTexture(GpImage *image, GpWrapMode wrapmode,
  277. GpTexture **texture);
  278. GpStatus GdipCreateTexture2(GpImage *image, GpWrapMode wrapmode, REAL x,
  279. REAL y, REAL width, REAL height, GpTexture **texture);
  280. GpStatus GdipCreateTextureIA(GpImage *image,
  281. GpImageAttributes *imageAttributes,
  282. REAL x, REAL y, REAL width, REAL height,
  283. GpTexture **texture);
  284. GpStatus GdipCreateTexture2I(GpImage *image, GpWrapMode wrapmode, INT x,
  285. INT y, INT width, INT height, GpTexture **texture);
  286. GpStatus GdipCreateTextureIAI(GpImage *image,
  287. GpImageAttributes *imageAttributes,
  288. INT x, INT y, INT width, INT height,
  289. GpTexture **texture);
  290. GpStatus GdipGetTextureTransform(GpTexture *brush, GpMatrix *matrix);
  291. GpStatus GdipSetTextureTransform(GpTexture *brush, GpMatrix *matrix);
  292. GpStatus GdipResetTextureTransform(GpTexture* brush);
  293. GpStatus GdipMultiplyTextureTransform(GpTexture* brush, GpMatrix *matrix,
  294. GpMatrixOrder order);
  295. GpStatus GdipTranslateTextureTransform(GpTexture* brush, REAL dx, REAL dy,
  296. GpMatrixOrder order);
  297. GpStatus GdipScaleTextureTransform(GpTexture* brush, REAL sx, REAL sy,
  298. GpMatrixOrder order);
  299. GpStatus GdipRotateTextureTransform(GpTexture* brush, REAL angle, GpMatrixOrder order);
  300. GpStatus GdipSetTextureWrapMode(GpTexture *brush, GpWrapMode wrapmode);
  301. GpStatus GdipGetTextureWrapMode(GpTexture *brush, GpWrapMode *wrapmode);
  302. GpStatus GdipGetTextureImage(GpTexture *brush, GpImage **image);
  303. //----------------------------------------------------------------------------
  304. // SolidBrush APIs
  305. //----------------------------------------------------------------------------
  306. GpStatus GdipCreateSolidFill(ARGB color, GpSolidFill **brush);
  307. GpStatus GdipSetSolidFillColor(GpSolidFill *brush, ARGB color);
  308. GpStatus GdipGetSolidFillColor(GpSolidFill *brush, ARGB *color);
  309. //----------------------------------------------------------------------------
  310. // LineBrush APIs
  311. //----------------------------------------------------------------------------
  312. GpStatus GdipCreateLineBrush(GpPointF* point1,
  313. GpPointF* point2,
  314. ARGB color1, ARGB color2,
  315. GpWrapMode wrapMode,
  316. GpLineGradient **lineGradient);
  317. GpStatus GdipCreateLineBrushI(GpPoint* point1,
  318. GpPoint* point2,
  319. ARGB color1, ARGB color2,
  320. GpWrapMode wrapMode,
  321. GpLineGradient **lineGradient);
  322. GpStatus GdipCreateLineBrushFromRect(GpRectF* rect,
  323. ARGB color1, ARGB color2,
  324. LinearGradientMode mode,
  325. GpWrapMode wrapMode,
  326. GpLineGradient **lineGradient);
  327. GpStatus GdipCreateLineBrushFromRectI(GpRect* rect,
  328. ARGB color1, ARGB color2,
  329. LinearGradientMode mode,
  330. GpWrapMode wrapMode,
  331. GpLineGradient **lineGradient);
  332. GpStatus GdipCreateLineBrushFromRectWithAngle(GpRectF* rect,
  333. ARGB color1, ARGB color2,
  334. REAL angle,
  335. BOOL isAngleScalable,
  336. GpWrapMode wrapMode,
  337. GpLineGradient **lineGradient);
  338. GpStatus GdipCreateLineBrushFromRectWithAngleI(GpRect* rect,
  339. ARGB color1, ARGB color2,
  340. REAL angle,
  341. BOOL isAngleScalable,
  342. GpWrapMode wrapMode,
  343. GpLineGradient **lineGradient);
  344. GpStatus GdipSetLineColors(GpLineGradient *brush, ARGB color1, ARGB color2);
  345. GpStatus GdipGetLineColors(GpLineGradient *brush, ARGB* colors);
  346. GpStatus GdipGetLineRect(GpLineGradient *brush, GpRectF *rect);
  347. GpStatus GdipGetLineRectI(GpLineGradient *brush, GpRect *rect);
  348. GpStatus GdipSetLineGammaCorrection(GpLineGradient *brush, BOOL useGammaCorrection);
  349. GpStatus GdipGetLineGammaCorrection(GpLineGradient *brush, BOOL *useGammaCorrection);
  350. GpStatus GdipGetLineBlendCount(GpLineGradient *brush, INT *count);
  351. GpStatus GdipGetLineBlend(GpLineGradient *brush, REAL *blend, REAL* positions,
  352. INT count);
  353. GpStatus GdipSetLineBlend(GpLineGradient *brush, REAL *blend,
  354. REAL* positions, INT count);
  355. GpStatus GdipGetLinePresetBlendCount(GpLineGradient *brush, INT *count);
  356. GpStatus GdipGetLinePresetBlend(GpLineGradient *brush, ARGB *blend,
  357. REAL* positions, INT count);
  358. GpStatus GdipSetLinePresetBlend(GpLineGradient *brush, ARGB *blend,
  359. REAL* positions, INT count);
  360. GpStatus GdipSetLineSigmaBlend(GpLineGradient *brush, REAL focus, REAL scale);
  361. GpStatus GdipSetLineLinearBlend(GpLineGradient *brush, REAL focus, REAL scale);
  362. GpStatus GdipSetLineWrapMode(GpLineGradient *brush, GpWrapMode wrapmode);
  363. GpStatus GdipGetLineWrapMode(GpLineGradient *brush, GpWrapMode *wrapmode);
  364. GpStatus GdipGetLineTransform(GpLineGradient *brush, GpMatrix *matrix);
  365. GpStatus GdipSetLineTransform(GpLineGradient *brush, GpMatrix *matrix);
  366. GpStatus GdipResetLineTransform(GpLineGradient* brush);
  367. GpStatus GdipMultiplyLineTransform(GpLineGradient* brush, GpMatrix *matrix,
  368. GpMatrixOrder order);
  369. GpStatus GdipTranslateLineTransform(GpLineGradient* brush, REAL dx, REAL dy,
  370. GpMatrixOrder order);
  371. GpStatus GdipScaleLineTransform(GpLineGradient* brush, REAL sx, REAL sy,
  372. GpMatrixOrder order);
  373. GpStatus GdipRotateLineTransform(GpLineGradient* brush, REAL angle,
  374. GpMatrixOrder order);
  375. //----------------------------------------------------------------------------
  376. // PathGradientBrush APIs
  377. //----------------------------------------------------------------------------
  378. GpStatus GdipCreatePathGradient(GpPointF* points,
  379. INT count,
  380. GpWrapMode wrapMode,
  381. GpPathGradient **polyGradient);
  382. GpStatus GdipCreatePathGradientI(GpPoint* points,
  383. INT count,
  384. GpWrapMode wrapMode,
  385. GpPathGradient **polyGradient);
  386. GpStatus GdipCreatePathGradientFromPath(GpPath* path,
  387. GpPathGradient **polyGradient);
  388. GpStatus GdipGetPathGradientCenterColor(
  389. GpPathGradient *brush, ARGB* colors);
  390. GpStatus GdipSetPathGradientCenterColor(
  391. GpPathGradient *brush, ARGB colors);
  392. GpStatus GdipGetPathGradientSurroundColorsWithCount(
  393. GpPathGradient *brush, ARGB* color, INT* count);
  394. GpStatus GdipSetPathGradientSurroundColorsWithCount(
  395. GpPathGradient *brush,
  396. ARGB* color, INT* count);
  397. GpStatus GdipGetPathGradientPath(GpPathGradient *brush, GpPath *path);
  398. GpStatus GdipSetPathGradientPath(GpPathGradient *brush, GpPath *path);
  399. GpStatus GdipGetPathGradientCenterPoint(
  400. GpPathGradient *brush, GpPointF* points);
  401. GpStatus GdipGetPathGradientCenterPointI(
  402. GpPathGradient *brush, GpPoint* points);
  403. GpStatus GdipSetPathGradientCenterPoint(
  404. GpPathGradient *brush, GpPointF* points);
  405. GpStatus GdipSetPathGradientCenterPointI(
  406. GpPathGradient *brush, GpPoint* points);
  407. GpStatus GdipGetPathGradientRect(GpPathGradient *brush, GpRectF *rect);
  408. GpStatus GdipGetPathGradientRectI(GpPathGradient *brush, GpRect *rect);
  409. GpStatus GdipGetPathGradientPointCount(GpPathGradient *brush, INT* count);
  410. GpStatus GdipGetPathGradientSurroundColorCount(GpPathGradient *brush, INT* count);
  411. GpStatus GdipSetPathGradientGammaCorrection(GpPathGradient *brush,
  412. BOOL useGammaCorrection);
  413. GpStatus GdipGetPathGradientGammaCorrection(GpPathGradient *brush,
  414. BOOL *useGammaCorrection);
  415. GpStatus GdipGetPathGradientBlendCount(GpPathGradient *brush,
  416. INT *count);
  417. GpStatus GdipGetPathGradientBlend(GpPathGradient *brush,
  418. REAL *blend, REAL *positions, INT count);
  419. GpStatus GdipSetPathGradientBlend(GpPathGradient *brush,
  420. REAL *blend, REAL *positions, INT count);
  421. GpStatus GdipGetPathGradientPresetBlendCount(GpPathGradient *brush, INT *count);
  422. GpStatus GdipGetPathGradientPresetBlend(GpPathGradient *brush, ARGB *blend,
  423. REAL* positions, INT count);
  424. GpStatus GdipSetPathGradientPresetBlend(GpPathGradient *brush, ARGB *blend,
  425. REAL* positions, INT count);
  426. GpStatus GdipSetPathGradientSigmaBlend(GpPathGradient *brush, REAL focus, REAL scale);
  427. GpStatus GdipSetPathGradientLinearBlend(GpPathGradient *brush, REAL focus, REAL scale);
  428. GpStatus GdipGetPathGradientWrapMode(GpPathGradient *brush,
  429. GpWrapMode *wrapmode);
  430. GpStatus GdipSetPathGradientWrapMode(GpPathGradient *brush,
  431. GpWrapMode wrapmode);
  432. GpStatus GdipGetPathGradientTransform(GpPathGradient *brush,
  433. GpMatrix *matrix);
  434. GpStatus GdipSetPathGradientTransform(GpPathGradient *brush,
  435. GpMatrix *matrix);
  436. GpStatus GdipResetPathGradientTransform(GpPathGradient* brush);
  437. GpStatus GdipMultiplyPathGradientTransform(GpPathGradient* brush,
  438. GpMatrix *matrix,
  439. GpMatrixOrder order);
  440. GpStatus GdipTranslatePathGradientTransform(GpPathGradient* brush, REAL dx, REAL dy,
  441. GpMatrixOrder order);
  442. GpStatus GdipScalePathGradientTransform(GpPathGradient* brush, REAL sx, REAL sy,
  443. GpMatrixOrder order);
  444. GpStatus GdipRotatePathGradientTransform(GpPathGradient* brush, REAL angle,
  445. GpMatrixOrder order);
  446. GpStatus GdipGetPathGradientFocusScales(GpPathGradient *brush, REAL* xScale,
  447. REAL* yScale);
  448. GpStatus GdipSetPathGradientFocusScales(GpPathGradient *brush, REAL xScale,
  449. REAL yScale);
  450. //----------------------------------------------------------------------------
  451. // Pen APIs
  452. //----------------------------------------------------------------------------
  453. GpStatus GdipCreatePen1(ARGB color, REAL width, GpUnit unit, GpPen **pen);
  454. GpStatus GdipCreatePen2(GpBrush *brush, REAL width, GpUnit unit,
  455. GpPen **pen);
  456. GpStatus GdipClonePen(GpPen *pen, GpPen **clonepen);
  457. GpStatus GdipDeletePen(GpPen *pen);
  458. GpStatus GdipSetPenWidth(GpPen *pen, REAL width);
  459. GpStatus GdipGetPenWidth(GpPen *pen, REAL *width);
  460. GpStatus GdipSetPenUnit(GpPen *pen, GpUnit unit);
  461. GpStatus GdipGetPenUnit(GpPen *pen, GpUnit *unit);
  462. GpStatus GdipSetPenLineCap197819(GpPen *pen, GpLineCap startCap, GpLineCap endCap,
  463. GpDashCap dashCap);
  464. GpStatus GdipSetPenStartCap(GpPen *pen, GpLineCap startCap);
  465. GpStatus GdipSetPenEndCap(GpPen *pen, GpLineCap endCap);
  466. GpStatus GdipSetPenDashCap197819(GpPen *pen, GpDashCap dashCap);
  467. GpStatus GdipGetPenStartCap(GpPen *pen, GpLineCap *startCap);
  468. GpStatus GdipGetPenEndCap(GpPen *pen, GpLineCap *endCap);
  469. GpStatus GdipGetPenDashCap197819(GpPen *pen, GpDashCap *dashCap);
  470. GpStatus GdipSetPenLineJoin(GpPen *pen, GpLineJoin lineJoin);
  471. GpStatus GdipGetPenLineJoin(GpPen *pen, GpLineJoin *lineJoin);
  472. GpStatus GdipSetPenCustomStartCap(GpPen *pen, GpCustomLineCap* customCap);
  473. GpStatus GdipGetPenCustomStartCap(GpPen *pen, GpCustomLineCap** customCap);
  474. GpStatus GdipSetPenCustomEndCap(GpPen *pen, GpCustomLineCap* customCap);
  475. GpStatus GdipGetPenCustomEndCap(GpPen *pen, GpCustomLineCap** customCap);
  476. GpStatus GdipSetPenMiterLimit(GpPen *pen, REAL miterLimit);
  477. GpStatus GdipGetPenMiterLimit(GpPen *pen, REAL *miterLimit);
  478. GpStatus GdipSetPenMode(GpPen *pen, GpPenAlignment penMode);
  479. GpStatus GdipGetPenMode(GpPen *pen, GpPenAlignment *penMode);
  480. GpStatus GdipSetPenTransform(GpPen *pen, GpMatrix *matrix);
  481. GpStatus GdipGetPenTransform(GpPen *pen, GpMatrix *matrix);
  482. GpStatus GdipResetPenTransform(GpPen *pen);
  483. GpStatus GdipMultiplyPenTransform(GpPen *pen, GpMatrix *matrix,
  484. GpMatrixOrder order);
  485. GpStatus GdipTranslatePenTransform(GpPen *pen, REAL dx, REAL dy,
  486. GpMatrixOrder order);
  487. GpStatus GdipScalePenTransform(GpPen *pen, REAL sx, REAL sy,
  488. GpMatrixOrder order);
  489. GpStatus GdipRotatePenTransform(GpPen *pen, REAL angle, GpMatrixOrder order);
  490. GpStatus GdipSetPenColor(GpPen *pen, ARGB argb);
  491. GpStatus GdipGetPenColor(GpPen *pen, ARGB *argb);
  492. GpStatus GdipSetPenBrushFill(GpPen *pen, GpBrush *brush);
  493. GpStatus GdipGetPenBrushFill(GpPen *pen, GpBrush **brush);
  494. GpStatus GdipGetPenFillType(GpPen *pen, GpPenType* type);
  495. GpStatus GdipGetPenDashStyle(GpPen *pen, GpDashStyle *dashstyle);
  496. GpStatus GdipSetPenDashStyle(GpPen *pen, GpDashStyle dashstyle);
  497. GpStatus GdipGetPenDashOffset(GpPen *pen, REAL *offset);
  498. GpStatus GdipSetPenDashOffset(GpPen *pen, REAL offset);
  499. GpStatus GdipGetPenDashCount(GpPen *pen, INT *count);
  500. GpStatus GdipSetPenDashArray(GpPen *pen, REAL *dash, INT count);
  501. GpStatus GdipGetPenDashArray(GpPen *pen, REAL *dash, INT count);
  502. GpStatus GdipGetPenCompoundCount(GpPen *pen, INT *count);
  503. GpStatus GdipSetPenCompoundArray(GpPen *pen, REAL *dash, INT count);
  504. GpStatus GdipGetPenCompoundArray(GpPen *pen, REAL *dash, INT count);
  505. //----------------------------------------------------------------------------
  506. // CustomLineCap APIs
  507. //----------------------------------------------------------------------------
  508. GpStatus GdipCreateCustomLineCap(GpPath* fillPath, GpPath* strokePath,
  509. GpLineCap baseCap, REAL baseInset, GpCustomLineCap **customCap);
  510. GpStatus GdipDeleteCustomLineCap(GpCustomLineCap* customCap);
  511. GpStatus GdipCloneCustomLineCap(GpCustomLineCap* customCap,
  512. GpCustomLineCap** clonedCap);
  513. GpStatus GdipGetCustomLineCapType(GpCustomLineCap* customCap,
  514. CustomLineCapType* capType);
  515. GpStatus GdipSetCustomLineCapStrokeCaps(GpCustomLineCap* customCap,
  516. GpLineCap startCap, GpLineCap endCap);
  517. GpStatus GdipGetCustomLineCapStrokeCaps(GpCustomLineCap* customCap,
  518. GpLineCap* startCap, GpLineCap* endCap);
  519. GpStatus GdipSetCustomLineCapStrokeJoin(GpCustomLineCap* customCap,
  520. GpLineJoin lineJoin);
  521. GpStatus GdipGetCustomLineCapStrokeJoin(GpCustomLineCap* customCap,
  522. GpLineJoin* lineJoin);
  523. GpStatus GdipSetCustomLineCapBaseCap(GpCustomLineCap* customCap, GpLineCap baseCap);
  524. GpStatus GdipGetCustomLineCapBaseCap(GpCustomLineCap* customCap, GpLineCap* baseCap);
  525. GpStatus GdipSetCustomLineCapBaseInset(GpCustomLineCap* customCap, REAL inset);
  526. GpStatus GdipGetCustomLineCapBaseInset(GpCustomLineCap* customCap, REAL* inset);
  527. GpStatus GdipSetCustomLineCapWidthScale(GpCustomLineCap* customCap, REAL widthScale);
  528. GpStatus GdipGetCustomLineCapWidthScale(GpCustomLineCap* customCap, REAL* widthScale);
  529. //----------------------------------------------------------------------------
  530. // AdjustableArrowCap APIs
  531. //----------------------------------------------------------------------------
  532. GpStatus GdipCreateAdjustableArrowCap(REAL height, REAL width, BOOL isFilled,
  533. GpAdjustableArrowCap **cap);
  534. GpStatus GdipSetAdjustableArrowCapHeight(GpAdjustableArrowCap* cap, REAL height);
  535. GpStatus GdipGetAdjustableArrowCapHeight(GpAdjustableArrowCap* cap, REAL* height);
  536. GpStatus GdipSetAdjustableArrowCapWidth(GpAdjustableArrowCap* cap, REAL width);
  537. GpStatus GdipGetAdjustableArrowCapWidth(GpAdjustableArrowCap* cap, REAL* width);
  538. GpStatus GdipSetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap* cap,
  539. REAL middleInset);
  540. GpStatus GdipGetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap* cap,
  541. REAL* middleInset);
  542. GpStatus GdipSetAdjustableArrowCapFillState(GpAdjustableArrowCap* cap, BOOL fillState);
  543. GpStatus GdipGetAdjustableArrowCapFillState(GpAdjustableArrowCap* cap, BOOL* fillState);
  544. //----------------------------------------------------------------------------
  545. // Image APIs
  546. //----------------------------------------------------------------------------
  547. //GpStatus GdipLoadImageFromStream(IStream* stream, GpImage **image);
  548. GpStatus GdipLoadImageFromFile(WCHAR* filename, GpImage **image);
  549. //GpStatus GdipLoadImageFromStreamICM(IStream* stream, GpImage **image);
  550. GpStatus GdipLoadImageFromFileICM(WCHAR* filename, GpImage **image);
  551. GpStatus GdipCloneImage(GpImage *image, GpImage **cloneImage);
  552. GpStatus GdipDisposeImage(GpImage *image);
  553. GpStatus GdipSaveImageToFile(GpImage *image, WCHAR* filename,
  554. CLSID* clsidEncoder,
  555. EncoderParameters* encoderParams);
  556. //GpStatus GdipSaveImageToStream(GpImage *image, IStream* stream,
  557. // CLSID* clsidEncoder,
  558. // EncoderParameters* encoderParams);
  559. GpStatus GdipSaveAdd(GpImage *image, EncoderParameters* encoderParams);
  560. GpStatus GdipSaveAddImage(GpImage *image, GpImage* newImage,
  561. EncoderParameters* encoderParams);
  562. GpStatus GdipGetImageGraphicsContext(GpImage *image, GpGraphics **graphics);
  563. GpStatus GdipGetImageBounds(GpImage *image, GpRectF *srcRect, GpUnit *srcUnit);
  564. GpStatus GdipGetImageDimension(GpImage *image, REAL *width, REAL *height);
  565. GpStatus GdipGetImageType(GpImage *image, ImageType *type);
  566. GpStatus GdipGetImageWidth(GpImage *image, UINT *width);
  567. GpStatus GdipGetImageHeight(GpImage *image, UINT *height);
  568. GpStatus GdipGetImageHorizontalResolution(GpImage *image, REAL *resolution);
  569. GpStatus GdipGetImageVerticalResolution(GpImage *image, REAL *resolution);
  570. GpStatus GdipGetImageFlags(GpImage *image, UINT *flags);
  571. GpStatus GdipGetImageRawFormat(GpImage *image, GUID *format);
  572. GpStatus GdipGetImagePixelFormat(GpImage *image, PixelFormat *format);
  573. GpStatus GdipGetImageThumbnail(GpImage *image, UINT thumbWidth, UINT thumbHeight,
  574. GpImage **thumbImage,
  575. GetThumbnailImageAbort callback, VOID * callbackData);
  576. GpStatus GdipGetEncoderParameterListSize(GpImage *image, CLSID* clsidEncoder,
  577. UINT* size);
  578. GpStatus GdipGetEncoderParameterList(GpImage *image, CLSID* clsidEncoder,
  579. UINT size, EncoderParameters* buffer);
  580. GpStatus GdipImageGetFrameDimensionsCount(GpImage* image, UINT* count);
  581. GpStatus GdipImageGetFrameDimensionsList(GpImage* image, GUID* dimensionIDs,
  582. UINT count);
  583. GpStatus GdipImageGetFrameCount(GpImage *image, GUID* dimensionID,
  584. UINT* count);
  585. GpStatus GdipImageSelectActiveFrame(GpImage *image, GUID* dimensionID,
  586. UINT frameIndex);
  587. GpStatus GdipImageRotateFlip(GpImage *image, RotateFlipType rfType);
  588. GpStatus GdipGetImagePalette(GpImage *image, ColorPalette *palette, INT size);
  589. GpStatus GdipSetImagePalette(GpImage *image, ColorPalette *palette);
  590. GpStatus GdipGetImagePaletteSize(GpImage *image, INT *size);
  591. GpStatus GdipGetPropertyCount(GpImage *image, UINT* numOfProperty);
  592. GpStatus GdipGetPropertyIdList(GpImage *image, UINT numOfProperty, PROPID* list);
  593. GpStatus GdipGetPropertyItemSize(GpImage *image, PROPID propId, UINT* size);
  594. GpStatus GdipGetPropertyItem(GpImage *image, PROPID propId,UINT propSize,
  595. PropertyItem* buffer);
  596. GpStatus GdipGetPropertySize(GpImage *image, UINT* totalBufferSize,
  597. UINT* numProperties);
  598. GpStatus GdipGetAllPropertyItems(GpImage *image, UINT totalBufferSize,
  599. UINT numProperties, PropertyItem* allItems);
  600. GpStatus GdipRemovePropertyItem(GpImage *image, PROPID propId);
  601. GpStatus GdipSetPropertyItem(GpImage *image, PropertyItem* item);
  602. version(GDIPLUS6) {
  603. GpStatus GdipFindFirstImageItem(GpImage *image, ImageItemData* item);
  604. GpStatus GdipFindNextImageItem(GpImage *image, ImageItemData* item);
  605. GpStatus GdipGetImageItemData(GpImage *image, ImageItemData* item);
  606. }
  607. GpStatus GdipImageForceValidation(GpImage *image);
  608. //----------------------------------------------------------------------------
  609. // Bitmap APIs
  610. //----------------------------------------------------------------------------
  611. //GpStatus GdipCreateBitmapFromStream(IStream* stream, GpBitmap **bitmap);
  612. GpStatus GdipCreateBitmapFromFile(WCHAR* filename, GpBitmap **bitmap);
  613. //GpStatus GdipCreateBitmapFromStreamICM(IStream* stream, GpBitmap **bitmap);
  614. GpStatus GdipCreateBitmapFromFileICM(WCHAR* filename, GpBitmap **bitmap);
  615. GpStatus GdipCreateBitmapFromScan0(INT width,
  616. INT height,
  617. INT stride,
  618. PixelFormat format,
  619. BYTE* scan0,
  620. GpBitmap** bitmap);
  621. GpStatus GdipCreateBitmapFromGraphics(INT width,
  622. INT height,
  623. GpGraphics* target,
  624. GpBitmap** bitmap);
  625. GpStatus GdipCreateBitmapFromDirectDrawSurface(IDirectDrawSurface7* surface,
  626. GpBitmap** bitmap);
  627. GpStatus GdipCreateBitmapFromGdiDib(BITMAPINFO* gdiBitmapInfo,
  628. VOID* gdiBitmapData,
  629. GpBitmap** bitmap);
  630. GpStatus GdipCreateBitmapFromHBITMAP(HBITMAP hbm,
  631. HPALETTE hpal,
  632. GpBitmap** bitmap);
  633. GpStatus GdipCreateHBITMAPFromBitmap(GpBitmap* bitmap,
  634. HBITMAP* hbmReturn,
  635. ARGB background);
  636. GpStatus GdipCreateBitmapFromHICON(HICON hicon,
  637. GpBitmap** bitmap);
  638. GpStatus GdipCreateHICONFromBitmap(GpBitmap* bitmap,
  639. HICON* hbmReturn);
  640. GpStatus GdipCreateBitmapFromResource(HINSTANCE hInstance,
  641. WCHAR* lpBitmapName,
  642. GpBitmap** bitmap);
  643. GpStatus GdipCloneBitmapArea(REAL x, REAL y, REAL width, REAL height,
  644. PixelFormat format,
  645. GpBitmap *srcBitmap,
  646. GpBitmap **dstBitmap);
  647. GpStatus GdipCloneBitmapAreaI(INT x,
  648. INT y,
  649. INT width,
  650. INT height,
  651. PixelFormat format,
  652. GpBitmap *srcBitmap,
  653. GpBitmap **dstBitmap);
  654. GpStatus GdipBitmapLockBits(GpBitmap* bitmap,
  655. GpRect* rect,
  656. UINT flags,
  657. PixelFormat format,
  658. BitmapData* lockedBitmapData);
  659. GpStatus GdipBitmapUnlockBits(GpBitmap* bitmap,
  660. BitmapData* lockedBitmapData);
  661. GpStatus GdipBitmapGetPixel(GpBitmap* bitmap, INT x, INT y, ARGB *color);
  662. GpStatus GdipBitmapSetPixel(GpBitmap* bitmap, INT x, INT y, ARGB color);
  663. version(GDIPLUS6) {
  664. GpStatus GdipImageSetAbort(
  665. GpImage *pImage,
  666. GdiplusAbort *pIAbort
  667. );
  668. GpStatus GdipGraphicsSetAbort(
  669. GpGraphics *pGraphics,
  670. GdiplusAbort *pIAbort
  671. );
  672. GpStatus GdipBitmapConvertFormat(
  673. GpBitmap *pInputBitmap,
  674. PixelFormat format,
  675. DitherType dithertype,
  676. PaletteType palettetype,
  677. ColorPalette *palette,
  678. REAL alphaThresholdPercent
  679. );
  680. GpStatus GdipInitializePalette(
  681. ColorPalette *palette, // output palette. must be allocated.
  682. PaletteType palettetype, // palette enumeration type.
  683. INT optimalColors, // how many optimal colors
  684. BOOL useTransparentColor, // add a transparent color to the palette.
  685. GpBitmap *bitmap // optional bitmap for median cut.
  686. );
  687. GpStatus GdipBitmapApplyEffect(
  688. GpBitmap* bitmap,
  689. CGpEffect *effect,
  690. RECT *roi,
  691. BOOL useAuxData,
  692. VOID **auxData,
  693. INT *auxDataSize
  694. );
  695. GpStatus GdipBitmapCreateApplyEffect(
  696. GpBitmap **inputBitmaps,
  697. INT numInputs,
  698. CGpEffect *effect,
  699. RECT *roi,
  700. RECT *outputRect,
  701. GpBitmap **outputBitmap,
  702. BOOL useAuxData,
  703. VOID **auxData,
  704. INT *auxDataSize
  705. );
  706. GpStatus GdipBitmapGetHistogram(
  707. GpBitmap* bitmap,
  708. HistogramFormat format,
  709. UINT NumberOfEntries,
  710. UINT *channel0,
  711. UINT *channel1,
  712. UINT *channel2,
  713. UINT *channel3
  714. );
  715. GpStatus GdipBitmapGetHistogramSize(
  716. HistogramFormat format,
  717. UINT *NumberOfEntries
  718. );
  719. }
  720. GpStatus GdipBitmapSetResolution(GpBitmap* bitmap, REAL xdpi, REAL ydpi);
  721. //----------------------------------------------------------------------------
  722. // ImageAttributes APIs
  723. //----------------------------------------------------------------------------
  724. GpStatus GdipCreateImageAttributes(GpImageAttributes **imageattr);
  725. GpStatus GdipCloneImageAttributes(GpImageAttributes *imageattr,
  726. GpImageAttributes **cloneImageattr);
  727. GpStatus GdipDisposeImageAttributes(GpImageAttributes *imageattr);
  728. GpStatus GdipSetImageAttributesToIdentity(GpImageAttributes *imageattr,
  729. ColorAdjustType type);
  730. GpStatus GdipResetImageAttributes(GpImageAttributes *imageattr,
  731. ColorAdjustType type);
  732. GpStatus GdipSetImageAttributesColorMatrix(GpImageAttributes *imageattr,
  733. ColorAdjustType type,
  734. BOOL enableFlag,
  735. ColorMatrix* colorMatrix,
  736. ColorMatrix* grayMatrix,
  737. ColorMatrixFlags flags);
  738. GpStatus GdipSetImageAttributesThreshold(GpImageAttributes *imageattr,
  739. ColorAdjustType type,
  740. BOOL enableFlag,
  741. REAL threshold);
  742. GpStatus GdipSetImageAttributesGamma(GpImageAttributes *imageattr,
  743. ColorAdjustType type,
  744. BOOL enableFlag,
  745. REAL gamma);
  746. GpStatus GdipSetImageAttributesNoOp(GpImageAttributes *imageattr,
  747. ColorAdjustType type,
  748. BOOL enableFlag);
  749. GpStatus GdipSetImageAttributesColorKeys(GpImageAttributes *imageattr,
  750. ColorAdjustType type,
  751. BOOL enableFlag,
  752. ARGB colorLow,
  753. ARGB colorHigh);
  754. GpStatus GdipSetImageAttributesOutputChannel(GpImageAttributes *imageattr,
  755. ColorAdjustType type,
  756. BOOL enableFlag,
  757. ColorChannelFlags channelFlags);
  758. GpStatus GdipSetImageAttributesOutputChannelColorProfile(GpImageAttributes *imageattr,
  759. ColorAdjustType type,
  760. BOOL enableFlag,
  761. WCHAR *colorProfileFilename);
  762. GpStatus GdipSetImageAttributesRemapTable(GpImageAttributes *imageattr,
  763. ColorAdjustType type,
  764. BOOL enableFlag,
  765. UINT mapSize,
  766. ColorMap *map);
  767. GpStatus GdipSetImageAttributesWrapMode(
  768. GpImageAttributes *imageAttr,
  769. WrapMode wrap,
  770. ARGB argb,
  771. BOOL clamp
  772. );
  773. GpStatus GdipSetImageAttributesICMMode(
  774. GpImageAttributes *imageAttr,
  775. BOOL on
  776. );
  777. GpStatus GdipGetImageAttributesAdjustedPalette(
  778. GpImageAttributes *imageAttr,
  779. ColorPalette * colorPalette,
  780. ColorAdjustType colorAdjustType
  781. );
  782. //----------------------------------------------------------------------------
  783. // Graphics APIs
  784. //----------------------------------------------------------------------------
  785. GpStatus GdipFlush(GpGraphics *graphics, GpFlushIntention intention);
  786. GpStatus GdipCreateFromHDC(HDC hdc, GpGraphics **graphics);
  787. GpStatus GdipCreateFromHDC2(HDC hdc, HANDLE hDevice, GpGraphics **graphics);
  788. GpStatus GdipCreateFromHWND(HWND hwnd, GpGraphics **graphics);
  789. GpStatus GdipCreateFromHWNDICM(HWND hwnd, GpGraphics **graphics);
  790. GpStatus GdipDeleteGraphics(GpGraphics *graphics);
  791. GpStatus GdipGetDC(GpGraphics* graphics, HDC * hdc);
  792. GpStatus GdipReleaseDC(GpGraphics* graphics, HDC hdc);
  793. GpStatus GdipSetCompositingMode(GpGraphics *graphics, CompositingMode compositingMode);
  794. GpStatus GdipGetCompositingMode(GpGraphics *graphics, CompositingMode *compositingMode);
  795. GpStatus GdipSetRenderingOrigin(GpGraphics *graphics, INT x, INT y);
  796. GpStatus GdipGetRenderingOrigin(GpGraphics *graphics, INT *x, INT *y);
  797. GpStatus GdipSetCompositingQuality(GpGraphics *graphics,
  798. CompositingQuality compositingQuality);
  799. GpStatus GdipGetCompositingQuality(GpGraphics *graphics,
  800. CompositingQuality *compositingQuality);
  801. GpStatus GdipSetSmoothingMode(GpGraphics *graphics, SmoothingMode smoothingMode);
  802. GpStatus GdipGetSmoothingMode(GpGraphics *graphics, SmoothingMode *smoothingMode);
  803. GpStatus GdipSetPixelOffsetMode(GpGraphics* graphics, PixelOffsetMode pixelOffsetMode);
  804. GpStatus GdipGetPixelOffsetMode(GpGraphics *graphics, PixelOffsetMode *pixelOffsetMode);
  805. GpStatus GdipSetTextRenderingHint(GpGraphics *graphics, TextRenderingHint mode);
  806. GpStatus GdipGetTextRenderingHint(GpGraphics *graphics, TextRenderingHint *mode);
  807. GpStatus GdipSetTextContrast(GpGraphics *graphics, UINT contrast);
  808. GpStatus GdipGetTextContrast(GpGraphics *graphics, UINT * contrast);
  809. GpStatus GdipSetInterpolationMode(GpGraphics *graphics,
  810. InterpolationMode interpolationMode);
  811. GpStatus GdipGetInterpolationMode(GpGraphics *graphics,
  812. InterpolationMode *interpolationMode);
  813. GpStatus GdipSetWorldTransform(GpGraphics *graphics, GpMatrix *matrix);
  814. GpStatus GdipResetWorldTransform(GpGraphics *graphics);
  815. GpStatus GdipMultiplyWorldTransform(GpGraphics *graphics, GpMatrix *matrix,
  816. GpMatrixOrder order);
  817. GpStatus GdipTranslateWorldTransform(GpGraphics *graphics, REAL dx, REAL dy,
  818. GpMatrixOrder order);
  819. GpStatus GdipScaleWorldTransform(GpGraphics *graphics, REAL sx, REAL sy,
  820. GpMatrixOrder order);
  821. GpStatus GdipRotateWorldTransform(GpGraphics *graphics, REAL angle,
  822. GpMatrixOrder order);
  823. GpStatus GdipGetWorldTransform(GpGraphics *graphics, GpMatrix *matrix);
  824. GpStatus GdipResetPageTransform(GpGraphics *graphics);
  825. GpStatus GdipGetPageUnit(GpGraphics *graphics, GpUnit *unit);
  826. GpStatus GdipGetPageScale(GpGraphics *graphics, REAL *scale);
  827. GpStatus GdipSetPageUnit(GpGraphics *graphics, GpUnit unit);
  828. GpStatus GdipSetPageScale(GpGraphics *graphics, REAL scale);
  829. GpStatus GdipGetDpiX(GpGraphics *graphics, REAL* dpi);
  830. GpStatus GdipGetDpiY(GpGraphics *graphics, REAL* dpi);
  831. GpStatus GdipTransformPoints(GpGraphics *graphics, GpCoordinateSpace destSpace,
  832. GpCoordinateSpace srcSpace, GpPointF *points,
  833. INT count);
  834. GpStatus GdipTransformPointsI(GpGraphics *graphics, GpCoordinateSpace destSpace,
  835. GpCoordinateSpace srcSpace, GpPoint *points,
  836. INT count);
  837. GpStatus GdipGetNearestColor(GpGraphics *graphics, ARGB* argb);
  838. // Creates the Win9x Halftone Palette (even on NT) with correct Desktop colors
  839. HPALETTE GdipCreateHalftonePalette();
  840. GpStatus GdipDrawLine(GpGraphics *graphics, GpPen *pen, REAL x1, REAL y1,
  841. REAL x2, REAL y2);
  842. GpStatus GdipDrawLineI(GpGraphics *graphics, GpPen *pen, INT x1, INT y1,
  843. INT x2, INT y2);
  844. GpStatus GdipDrawLines(GpGraphics *graphics, GpPen *pen, GpPointF *points,
  845. INT count);
  846. GpStatus GdipDrawLinesI(GpGraphics *graphics, GpPen *pen, GpPoint *points,
  847. INT count);
  848. GpStatus GdipDrawArc(GpGraphics *graphics, GpPen *pen, REAL x, REAL y,
  849. REAL width, REAL height, REAL startAngle, REAL sweepAngle);
  850. GpStatus GdipDrawArcI(GpGraphics *graphics, GpPen *pen, INT x, INT y,
  851. INT width, INT height, REAL startAngle, REAL sweepAngle);
  852. GpStatus GdipDrawBezier(GpGraphics *graphics, GpPen *pen, REAL x1, REAL y1,
  853. REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4);
  854. GpStatus GdipDrawBezierI(GpGraphics *graphics, GpPen *pen, INT x1, INT y1,
  855. INT x2, INT y2, INT x3, INT y3, INT x4, INT y4);
  856. GpStatus GdipDrawBeziers(GpGraphics *graphics, GpPen *pen, GpPointF *points,
  857. INT count);
  858. GpStatus GdipDrawBeziersI(GpGraphics *graphics, GpPen *pen, GpPoint *points,
  859. INT count);
  860. GpStatus GdipDrawRectangle(GpGraphics *graphics, GpPen *pen, REAL x, REAL y,
  861. REAL width, REAL height);
  862. GpStatus GdipDrawRectangleI(GpGraphics *graphics, GpPen *pen, INT x, INT y,
  863. INT width, INT height);
  864. GpStatus GdipDrawRectangles(GpGraphics *graphics, GpPen *pen, GpRectF *rects,
  865. INT count);
  866. GpStatus GdipDrawRectanglesI(GpGraphics *graphics, GpPen *pen, GpRect *rects,
  867. INT count);
  868. GpStatus GdipDrawEllipse(GpGraphics *graphics, GpPen *pen, REAL x, REAL y,
  869. REAL width, REAL height);
  870. GpStatus GdipDrawEllipseI(GpGraphics *graphics, GpPen *pen, INT x, INT y,
  871. INT width, INT height);
  872. GpStatus GdipDrawPie(GpGraphics *graphics, GpPen *pen, REAL x, REAL y,
  873. REAL width, REAL height, REAL startAngle,
  874. REAL sweepAngle);
  875. GpStatus GdipDrawPieI(GpGraphics *graphics, GpPen *pen, INT x, INT y,
  876. INT width, INT height, REAL startAngle, REAL sweepAngle);
  877. GpStatus GdipDrawPolygon(GpGraphics *graphics, GpPen *pen, GpPointF *points,
  878. INT count);
  879. GpStatus GdipDrawPolygonI(GpGraphics *graphics, GpPen *pen, GpPoint *points,
  880. INT count);
  881. GpStatus GdipDrawPath(GpGraphics *graphics, GpPen *pen, GpPath *path);
  882. GpSt