PageRenderTime 58ms CodeModel.GetById 15ms RepoModel.GetById 0ms 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
  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. GpStatus GdipDrawCurve(GpGraphics *graphics, GpPen *pen, GpPointF *points,
  883. INT count);
  884. GpStatus GdipDrawCurveI(GpGraphics *graphics, GpPen *pen, GpPoint *points,
  885. INT count);
  886. GpStatus GdipDrawCurve2(GpGraphics *graphics, GpPen *pen, GpPointF *points,
  887. INT count, REAL tension);
  888. GpStatus GdipDrawCurve2I(GpGraphics *graphics, GpPen *pen, GpPoint *points,
  889. INT count, REAL tension);
  890. GpStatus GdipDrawCurve3(GpGraphics *graphics, GpPen *pen, GpPointF *points,
  891. INT count, INT offset, INT numberOfSegments, REAL tension);
  892. GpStatus GdipDrawCurve3I(GpGraphics *graphics, GpPen *pen, GpPoint *points,
  893. INT count, INT offset, INT numberOfSegments, REAL tension);
  894. GpStatus GdipDrawClosedCurve(GpGraphics *graphics, GpPen *pen,
  895. GpPointF *points, INT count);
  896. GpStatus GdipDrawClosedCurveI(GpGraphics *graphics, GpPen *pen,
  897. GpPoint *points, INT count);
  898. GpStatus GdipDrawClosedCurve2(GpGraphics *graphics, GpPen *pen,
  899. GpPointF *points, INT count, REAL tension);
  900. GpStatus GdipDrawClosedCurve2I(GpGraphics *graphics, GpPen *pen,
  901. GpPoint *points, INT count, REAL tension);
  902. GpStatus GdipGraphicsClear(GpGraphics *graphics, ARGB color);
  903. GpStatus GdipFillRectangle(GpGraphics *graphics, GpBrush *brush, REAL x, REAL y,
  904. REAL width, REAL height);
  905. GpStatus GdipFillRectangleI(GpGraphics *graphics, GpBrush *brush, INT x, INT y,
  906. INT width, INT height);
  907. GpStatus GdipFillRectangles(GpGraphics *graphics, GpBrush *brush,
  908. GpRectF *rects, INT count);
  909. GpStatus GdipFillRectanglesI(GpGraphics *graphics, GpBrush *brush,
  910. GpRect *rects, INT count);
  911. GpStatus GdipFillPolygon(GpGraphics *graphics, GpBrush *brush,
  912. GpPointF *points, INT count, GpFillMode fillMode);
  913. GpStatus GdipFillPolygonI(GpGraphics *graphics, GpBrush *brush,
  914. GpPoint *points, INT count, GpFillMode fillMode);
  915. GpStatus GdipFillPolygon2(GpGraphics *graphics, GpBrush *brush,
  916. GpPointF *points, INT count);
  917. GpStatus GdipFillPolygon2I(GpGraphics *graphics, GpBrush *brush,
  918. GpPoint *points, INT count);
  919. GpStatus GdipFillEllipse(GpGraphics *graphics, GpBrush *brush, REAL x, REAL y,
  920. REAL width, REAL height);
  921. GpStatus GdipFillEllipseI(GpGraphics *graphics, GpBrush *brush, INT x, INT y,
  922. INT width, INT height);
  923. GpStatus GdipFillPie(GpGraphics *graphics, GpBrush *brush, REAL x, REAL y,
  924. REAL width, REAL height, REAL startAngle, REAL sweepAngle);
  925. GpStatus GdipFillPieI(GpGraphics *graphics, GpBrush *brush, INT x, INT y,
  926. INT width, INT height, REAL startAngle, REAL sweepAngle);
  927. GpStatus GdipFillPath(GpGraphics *graphics, GpBrush *brush, GpPath *path);
  928. GpStatus GdipFillClosedCurve(GpGraphics *graphics, GpBrush *brush,
  929. GpPointF *points, INT count);
  930. GpStatus GdipFillClosedCurveI(GpGraphics *graphics, GpBrush *brush,
  931. GpPoint *points, INT count);
  932. GpStatus GdipFillClosedCurve2(GpGraphics *graphics, GpBrush *brush,
  933. GpPointF *points, INT count,
  934. REAL tension, GpFillMode fillMode);
  935. GpStatus GdipFillClosedCurve2I(GpGraphics *graphics, GpBrush *brush,
  936. GpPoint *points, INT count,
  937. REAL tension, GpFillMode fillMode);
  938. GpStatus GdipFillRegion(GpGraphics *graphics, GpBrush *brush,
  939. GpRegion *region);
  940. version(GDIPLUS6) {
  941. GpStatus GdipDrawImageFX(
  942. GpGraphics *graphics,
  943. GpImage *image,
  944. GpRectF *source,
  945. GpMatrix *xForm,
  946. CGpEffect *effect,
  947. GpImageAttributes *imageAttributes,
  948. GpUnit srcUnit
  949. );
  950. }
  951. GpStatus GdipDrawImage(GpGraphics *graphics, GpImage *image, REAL x, REAL y);
  952. GpStatus GdipDrawImageI(GpGraphics *graphics, GpImage *image, INT x, INT y);
  953. GpStatus GdipDrawImageRect(GpGraphics *graphics, GpImage *image, REAL x, REAL y,
  954. REAL width, REAL height);
  955. GpStatus GdipDrawImageRectI(GpGraphics *graphics, GpImage *image, INT x, INT y,
  956. INT width, INT height);
  957. GpStatus GdipDrawImagePoints(GpGraphics *graphics, GpImage *image,
  958. GpPointF *dstpoints, INT count);
  959. GpStatus GdipDrawImagePointsI(GpGraphics *graphics, GpImage *image,
  960. GpPoint *dstpoints, INT count);
  961. GpStatus GdipDrawImagePointRect(GpGraphics *graphics, GpImage *image, REAL x,
  962. REAL y, REAL srcx, REAL srcy, REAL srcwidth,
  963. REAL srcheight, GpUnit srcUnit);
  964. GpStatus GdipDrawImagePointRectI(GpGraphics *graphics, GpImage *image, INT x,
  965. INT y, INT srcx, INT srcy, INT srcwidth,
  966. INT srcheight, GpUnit srcUnit);
  967. GpStatus GdipDrawImageRectRect(GpGraphics *graphics, GpImage *image, REAL dstx,
  968. REAL dsty, REAL dstwidth, REAL dstheight,
  969. REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight,
  970. GpUnit srcUnit,
  971. GpImageAttributes* imageAttributes,
  972. DrawImageAbort callback, VOID * callbackData);
  973. GpStatus GdipDrawImageRectRectI(GpGraphics *graphics, GpImage *image, INT dstx,
  974. INT dsty, INT dstwidth, INT dstheight,
  975. INT srcx, INT srcy, INT srcwidth, INT srcheight,
  976. GpUnit srcUnit,
  977. GpImageAttributes* imageAttributes,
  978. DrawImageAbort callback, VOID * callbackData);
  979. GpStatus GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image,
  980. GpPointF *points, INT count, REAL srcx,
  981. REAL srcy, REAL srcwidth, REAL srcheight,
  982. GpUnit srcUnit,
  983. GpImageAttributes* imageAttributes,
  984. DrawImageAbort callback, VOID * callbackData);
  985. GpStatus GdipDrawImagePointsRectI(GpGraphics *graphics, GpImage *image,
  986. GpPoint *points, INT count, INT srcx,
  987. INT srcy, INT srcwidth, INT srcheight,
  988. GpUnit srcUnit,
  989. GpImageAttributes* imageAttributes,
  990. DrawImageAbort callback, VOID * callbackData);
  991. GpStatus GdipEnumerateMetafileDestPoint(
  992. GpGraphics * graphics,
  993. GpMetafile * metafile,
  994. ref PointF destPoint,
  995. EnumerateMetafileProc callback,
  996. VOID * callbackData,
  997. GpImageAttributes * imageAttributes
  998. );
  999. GpStatus GdipEnumerateMetafileDestPointI(
  1000. GpGraphics * graphics,
  1001. GpMetafile * metafile,
  1002. ref Point destPoint,
  1003. EnumerateMetafileProc callback,
  1004. VOID * callbackData,
  1005. GpImageAttributes * imageAttributes
  1006. );
  1007. GpStatus GdipEnumerateMetafileDestRect(
  1008. GpGraphics * graphics,
  1009. GpMetafile * metafile,
  1010. ref RectF destRect,
  1011. EnumerateMetafileProc callback,
  1012. VOID * callbackData,
  1013. GpImageAttributes * imageAttributes
  1014. );
  1015. GpStatus GdipEnumerateMetafileDestRectI(
  1016. GpGraphics * graphics,
  1017. GpMetafile * metafile,
  1018. ref Rect destRect,
  1019. EnumerateMetafileProc callback,
  1020. VOID * callbackData,
  1021. GpImageAttributes * imageAttributes
  1022. );
  1023. GpStatus GdipEnumerateMetafileDestPoints(
  1024. GpGraphics * graphics,
  1025. GpMetafile * metafile,
  1026. PointF * destPoints,
  1027. INT count,
  1028. EnumerateMetafileProc callback,
  1029. VOID * callbackData,
  1030. GpImageAttributes * imageAttributes
  1031. );
  1032. GpStatus GdipEnumerateMetafileDestPointsI(
  1033. GpGraphics * graphics,
  1034. GpMetafile * metafile,
  1035. Point * destPoints,
  1036. INT count,
  1037. EnumerateMetafileProc callback,
  1038. VOID * callbackData,
  1039. GpImageAttributes * imageAttributes
  1040. );
  1041. GpStatus GdipEnumerateMetafileSrcRectDestPoint(
  1042. GpGraphics * graphics,
  1043. GpMetafile * metafile,
  1044. ref PointF destPoint,
  1045. ref RectF srcRect,
  1046. Unit srcUnit,
  1047. EnumerateMetafileProc callback,
  1048. VOID * callbackData,
  1049. GpImageAttributes * imageAttributes
  1050. );
  1051. GpStatus GdipEnumerateMetafileSrcRectDestPointI(
  1052. GpGraphics * graphics,
  1053. GpMetafile * metafile,
  1054. ref Point destPoint,
  1055. ref Rect srcRect,
  1056. Unit srcUnit,
  1057. EnumerateMetafileProc callback,
  1058. VOID * callbackData,
  1059. GpImageAttributes * imageAttributes
  1060. );
  1061. GpStatus GdipEnumerateMetafileSrcRectDestRect(
  1062. GpGraphics * graphics,
  1063. GpMetafile * metafile,
  1064. ref RectF destRect,
  1065. ref RectF srcRect,
  1066. Unit srcUnit,
  1067. EnumerateMetafileProc callback,
  1068. VOID * callbackData,
  1069. GpImageAttributes * imageAttributes
  1070. );
  1071. GpStatus GdipEnumerateMetafileSrcRectDestRectI(
  1072. GpGraphics * graphics,
  1073. GpMetafile * metafile,
  1074. ref Rect destRect,
  1075. ref Rect srcRect,
  1076. Unit srcUnit,
  1077. EnumerateMetafileProc callback,
  1078. VOID * callbackData,
  1079. GpImageAttributes * imageAttributes
  1080. );
  1081. GpStatus GdipEnumerateMetafileSrcRectDestPoints(
  1082. GpGraphics * graphics,
  1083. GpMetafile * metafile,
  1084. PointF * destPoints,
  1085. INT count,
  1086. ref RectF srcRect,
  1087. Unit srcUnit,
  1088. EnumerateMetafileProc callback,
  1089. VOID * callbackData,
  1090. GpImageAttributes * imageAttributes
  1091. );
  1092. GpStatus GdipEnumerateMetafileSrcRectDestPointsI(
  1093. GpGraphics * graphics,
  1094. GpMetafile * metafile,
  1095. Point * destPoints,
  1096. INT count,
  1097. ref Rect srcRect,
  1098. Unit srcUnit,
  1099. EnumerateMetafileProc callback,
  1100. VOID * callbackData,
  1101. GpImageAttributes * imageAttributes
  1102. );
  1103. GpStatus GdipPlayMetafileRecord(
  1104. GpMetafile * metafile,
  1105. EmfPlusRecordType recordType,
  1106. UINT flags,
  1107. UINT dataSize,
  1108. BYTE * data
  1109. );
  1110. GpStatus GdipSetClipGraphics(GpGraphics *graphics, GpGraphics *srcgraphics,
  1111. CombineMode combineMode);
  1112. GpStatus GdipSetClipRect(GpGraphics *graphics, REAL x, REAL y,
  1113. REAL width, REAL height, CombineMode combineMode);
  1114. GpStatus GdipSetClipRectI(GpGraphics *graphics, INT x, INT y,
  1115. INT width, INT height, CombineMode combineMode);
  1116. GpStatus GdipSetClipPath(GpGraphics *graphics, GpPath *path, CombineMode combineMode);
  1117. GpStatus GdipSetClipRegion(GpGraphics *graphics, GpRegion *region,
  1118. CombineMode combineMode);
  1119. GpStatus GdipSetClipHrgn(GpGraphics *graphics, HRGN hRgn, CombineMode combineMode);
  1120. GpStatus GdipResetClip(GpGraphics *graphics);
  1121. GpStatus GdipTranslateClip(GpGraphics *graphics, REAL dx, REAL dy);
  1122. GpStatus GdipTranslateClipI(GpGraphics *graphics, INT dx, INT dy);
  1123. GpStatus GdipGetClip(GpGraphics *graphics, GpRegion *region);
  1124. GpStatus GdipGetClipBounds(GpGraphics *graphics, GpRectF *rect);
  1125. GpStatus GdipGetClipBoundsI(GpGraphics *graphics, GpRect *rect);
  1126. GpStatus GdipIsClipEmpty(GpGraphics *graphics, BOOL *result);
  1127. GpStatus GdipGetVisibleClipBounds(GpGraphics *graphics, GpRectF *rect);
  1128. GpStatus GdipGetVisibleClipBoundsI(GpGraphics *graphics, GpRect *rect);
  1129. GpStatus GdipIsVisibleClipEmpty(GpGraphics *graphics, BOOL *result);
  1130. GpStatus GdipIsVisiblePoint(GpGraphics *graphics, REAL x, REAL y,
  1131. BOOL *result);
  1132. GpStatus GdipIsVisiblePointI(GpGraphics *graphics, INT x, INT y,
  1133. BOOL *result);
  1134. GpStatus GdipIsVisibleRect(GpGraphics *graphics, REAL x, REAL y,
  1135. REAL width, REAL height, BOOL *result);
  1136. GpStatus GdipIsVisibleRectI(GpGraphics *graphics, INT x, INT y,
  1137. INT width, INT height, BOOL *result);
  1138. GpStatus GdipSaveGraphics(GpGraphics *graphics, GraphicsState *state);
  1139. GpStatus GdipRestoreGraphics(GpGraphics *graphics, GraphicsState state);
  1140. GpStatus GdipBeginContainer(GpGraphics *graphics, GpRectF* dstrect,
  1141. GpRectF *srcrect, GpUnit unit,
  1142. GraphicsContainer *state);
  1143. GpStatus GdipBeginContainerI(GpGraphics *graphics, GpRect* dstrect,
  1144. GpRect *srcrect, GpUnit unit,
  1145. GraphicsContainer *state);
  1146. GpStatus GdipBeginContainer2(GpGraphics *graphics, GraphicsContainer* state);
  1147. GpStatus GdipEndContainer(GpGraphics *graphics, GraphicsContainer state);
  1148. GpStatus GdipGetMetafileHeaderFromWmf(
  1149. HMETAFILE hWmf,
  1150. WmfPlaceableFileHeader * wmfPlaceableFileHeader,
  1151. MetafileHeader * header
  1152. );
  1153. GpStatus GdipGetMetafileHeaderFromEmf(
  1154. HENHMETAFILE hEmf,
  1155. MetafileHeader * header
  1156. );
  1157. GpStatus GdipGetMetafileHeaderFromFile(
  1158. WCHAR* filename,
  1159. MetafileHeader * header
  1160. );
  1161. //GpStatus GdipGetMetafileHeaderFromStream(
  1162. // IStream * stream,
  1163. // MetafileHeader * header
  1164. // );
  1165. GpStatus GdipGetMetafileHeaderFromMetafile(
  1166. GpMetafile * metafile,
  1167. MetafileHeader * header
  1168. );
  1169. GpStatus GdipGetHemfFromMetafile(
  1170. GpMetafile * metafile,
  1171. HENHMETAFILE * hEmf
  1172. );
  1173. //GpStatus GdipCreateStreamOnFile(WCHAR * filename, UINT access,
  1174. // IStream **stream);
  1175. GpStatus GdipCreateMetafileFromWmf(HMETAFILE hWmf, BOOL deleteWmf,
  1176. WmfPlaceableFileHeader * wmfPlaceableFileHeader,
  1177. GpMetafile **metafile);
  1178. GpStatus GdipCreateMetafileFromEmf(HENHMETAFILE hEmf, BOOL deleteEmf,
  1179. GpMetafile **metafile);
  1180. GpStatus GdipCreateMetafileFromFile(WCHAR* file, GpMetafile **metafile);
  1181. GpStatus GdipCreateMetafileFromWmfFile(WCHAR* file,
  1182. WmfPlaceableFileHeader * wmfPlaceableFileHeader,
  1183. GpMetafile **metafile);
  1184. //GpStatus GdipCreateMetafileFromStream(IStream * stream, GpMetafile **metafile);
  1185. GpStatus GdipRecordMetafile(
  1186. HDC referenceHdc,
  1187. EmfType type,
  1188. GpRectF * frameRect,
  1189. MetafileFrameUnit frameUnit,
  1190. WCHAR * description,
  1191. GpMetafile ** metafile
  1192. );
  1193. GpStatus GdipRecordMetafileI(
  1194. HDC referenceHdc,
  1195. EmfType type,
  1196. GpRect * frameRect,
  1197. MetafileFrameUnit frameUnit,
  1198. WCHAR * description,
  1199. GpMetafile ** metafile
  1200. );
  1201. GpStatus GdipRecordMetafileFileName(
  1202. WCHAR* fileName,
  1203. HDC referenceHdc,
  1204. EmfType type,
  1205. GpRectF * frameRect,
  1206. MetafileFrameUnit frameUnit,
  1207. WCHAR * description,
  1208. GpMetafile ** metafile
  1209. );
  1210. GpStatus GdipRecordMetafileFileNameI(
  1211. WCHAR* fileName,
  1212. HDC referenceHdc,
  1213. EmfType type,
  1214. GpRect * frameRect,
  1215. MetafileFrameUnit frameUnit,
  1216. WCHAR * description,
  1217. GpMetafile ** metafile
  1218. );
  1219. /*GpStatus GdipRecordMetafileStream(
  1220. IStream * stream,
  1221. HDC referenceHdc,
  1222. EmfType type,
  1223. GpRectF * frameRect,
  1224. MetafileFrameUnit frameUnit,
  1225. WCHAR * description,
  1226. GpMetafile ** metafile
  1227. );
  1228. */
  1229. /*GpStatus GdipRecordMetafileStreamI(
  1230. IStream * stream,
  1231. HDC referenceHdc,
  1232. EmfType type,
  1233. GpRect * frameRect,
  1234. MetafileFrameUnit frameUnit,
  1235. WCHAR * description,
  1236. GpMetafile ** metafile
  1237. );
  1238. */
  1239. GpStatus GdipSetMetafileDownLevelRasterizationLimit(
  1240. GpMetafile * metafile,
  1241. UINT metafileRasterizationLimitDpi
  1242. );
  1243. GpStatus GdipGetMetafileDownLevelRasterizationLimit(
  1244. GpMetafile * metafile,
  1245. UINT * metafileRasterizationLimitDpi
  1246. );
  1247. GpStatus GdipGetImageDecodersSize(UINT *numDecoders, UINT *size);
  1248. GpStatus GdipGetImageDecoders(UINT numDecoders,
  1249. UINT size,
  1250. ImageCodecInfo *decoders);
  1251. GpStatus GdipGetImageEncodersSize(UINT *numEncoders, UINT *size);
  1252. GpStatus GdipGetImageEncoders(UINT numEncoders,
  1253. UINT size,
  1254. ImageCodecInfo *encoders);
  1255. GpStatus GdipComment(GpGraphics* graphics, UINT sizeData, BYTE * data);
  1256. //----------------------------------------------------------------------------
  1257. // FontFamily APIs
  1258. //----------------------------------------------------------------------------
  1259. GpStatus GdipCreateFontFamilyFromName(WCHAR *name,
  1260. GpFontCollection *fontCollection,
  1261. GpFontFamily **FontFamily);
  1262. GpStatus GdipDeleteFontFamily(GpFontFamily *FontFamily);
  1263. GpStatus GdipCloneFontFamily(GpFontFamily *FontFamily, GpFontFamily **clonedFontFamily);
  1264. GpStatus GdipGetGenericFontFamilySansSerif(GpFontFamily **nativeFamily);
  1265. GpStatus GdipGetGenericFontFamilySerif(GpFontFamily **nativeFamily);
  1266. GpStatus GdipGetGenericFontFamilyMonospace(GpFontFamily **nativeFamily);
  1267. GpStatus GdipGetFamilyName(
  1268. GpFontFamily *family,
  1269. LPWSTR name,
  1270. LANGID language
  1271. );
  1272. GpStatus GdipIsStyleAvailable(GpFontFamily *family, INT style,
  1273. BOOL * IsStyleAvailable);
  1274. GpStatus GdipFontCollectionEnumerable(
  1275. GpFontCollection* fontCollection,
  1276. GpGraphics* graphics,
  1277. INT * numFound
  1278. );
  1279. GpStatus GdipFontCollectionEnumerate(
  1280. GpFontCollection* fontCollection,
  1281. INT numSought,
  1282. GpFontFamily* gpfamilies[],
  1283. INT* numFound,
  1284. GpGraphics* graphics
  1285. );
  1286. GpStatus GdipGetEmHeight(GpFontFamily *family, INT style,
  1287. UINT16 * EmHeight);
  1288. GpStatus GdipGetCellAscent(GpFontFamily *family, INT style,
  1289. UINT16 * CellAscent);
  1290. GpStatus GdipGetCellDescent(GpFontFamily *family, INT style,
  1291. UINT16 * CellDescent);
  1292. GpStatus GdipGetLineSpacing(GpFontFamily *family, INT style,
  1293. UINT16 * LineSpacing);
  1294. //----------------------------------------------------------------------------
  1295. // Font APIs
  1296. //----------------------------------------------------------------------------
  1297. GpStatus GdipCreateFontFromDC(
  1298. HDC hdc,
  1299. GpFont **font
  1300. );
  1301. GpStatus GdipCreateFontFromLogfontA(
  1302. HDC hdc,
  1303. LOGFONTA *logfont,
  1304. GpFont **font
  1305. );
  1306. GpStatus GdipCreateFontFromLogfontW(
  1307. HDC hdc,
  1308. LOGFONTW *logfont,
  1309. GpFont **font
  1310. );
  1311. GpStatus GdipCreateFont(
  1312. GpFontFamily *fontFamily,
  1313. REAL emSize,
  1314. INT style,
  1315. Unit unit,
  1316. GpFont **font
  1317. );
  1318. GpStatus GdipCloneFont(GpFont* font, GpFont** cloneFont);
  1319. GpStatus GdipDeleteFont(GpFont* font);
  1320. GpStatus GdipGetFamily(GpFont *font, GpFontFamily **family);
  1321. GpStatus GdipGetFontStyle(GpFont *font, INT *style);
  1322. GpStatus GdipGetFontSize(GpFont *font, REAL *size);
  1323. GpStatus GdipGetFontUnit(GpFont *font, Unit *unit);
  1324. GpStatus GdipGetFontHeight(GpFont *font, GpGraphics *graphics,
  1325. REAL *height);
  1326. GpStatus GdipGetFontHeightGivenDPI(GpFont *font, REAL dpi, REAL *height);
  1327. GpStatus GdipGetLogFontA(GpFont * font, GpGraphics *graphics, LOGFONTA * logfontA);
  1328. GpStatus GdipGetLogFontW(GpFont * font, GpGraphics *graphics, LOGFONTW * logfontW);
  1329. GpStatus GdipNewInstalledFontCollection(GpFontCollection** fontCollection);
  1330. GpStatus GdipNewPrivateFontCollection(GpFontCollection** fontCollection);
  1331. GpStatus GdipDeletePrivateFontCollection(GpFontCollection** fontCollection);
  1332. GpStatus GdipGetFontCollectionFamilyCount(
  1333. GpFontCollection* fontCollection,
  1334. INT * numFound
  1335. );
  1336. GpStatus GdipGetFontCollectionFamilyList(
  1337. GpFontCollection* fontCollection,
  1338. INT numSought,
  1339. GpFontFamily* gpfamilies[],
  1340. INT* numFound
  1341. );
  1342. GpStatus GdipPrivateAddFontFile(
  1343. GpFontCollection* fontCollection,
  1344. WCHAR* filename
  1345. );
  1346. GpStatus GdipPrivateAddMemoryFont(
  1347. GpFontCollection* fontCollection,
  1348. void* memory,
  1349. INT length
  1350. );
  1351. //----------------------------------------------------------------------------
  1352. // Text APIs
  1353. //----------------------------------------------------------------------------
  1354. GpStatus GdipDrawString(
  1355. GpGraphics *graphics,
  1356. WCHAR *string,
  1357. INT length,
  1358. GpFont *font,
  1359. RectF *layoutRect,
  1360. GpStringFormat *stringFormat,
  1361. GpBrush *brush
  1362. );
  1363. GpStatus GdipMeasureString(
  1364. GpGraphics *graphics,
  1365. WCHAR *string,
  1366. INT length,
  1367. GpFont *font,
  1368. RectF *layoutRect,
  1369. GpStringFormat *stringFormat,
  1370. RectF *boundingBox,
  1371. INT *codepointsFitted,
  1372. INT *linesFilled
  1373. );
  1374. GpStatus GdipMeasureCharacterRanges(
  1375. GpGraphics *graphics,
  1376. WCHAR *string,
  1377. INT length,
  1378. GpFont *font,
  1379. ref RectF layoutRect,
  1380. GpStringFormat *stringFormat,
  1381. INT regionCount,
  1382. GpRegion **regions
  1383. );
  1384. GpStatus GdipDrawDriverString(
  1385. GpGraphics *graphics,
  1386. UINT16 *text,
  1387. INT length,
  1388. GpFont *font,
  1389. GpBrush *brush,
  1390. PointF *positions,
  1391. INT flags,
  1392. GpMatrix *matrix
  1393. );
  1394. GpStatus GdipMeasureDriverString(
  1395. GpGraphics *graphics,
  1396. UINT16 *text,
  1397. INT length,
  1398. GpFont *font,
  1399. PointF *positions,
  1400. INT flags,
  1401. GpMatrix *matrix,
  1402. RectF *boundingBox
  1403. );
  1404. //----------------------------------------------------------------------------
  1405. // String format APIs
  1406. //----------------------------------------------------------------------------
  1407. GpStatus GdipCreateStringFormat(
  1408. INT formatAttributes,
  1409. LANGID language,
  1410. GpStringFormat **format
  1411. );
  1412. GpStatus GdipStringFormatGetGenericDefault(GpStringFormat **format);
  1413. GpStatus GdipStringFormatGetGenericTypographic(GpStringFormat **format);
  1414. GpStatus GdipDeleteStringFormat(GpStringFormat *format);
  1415. GpStatus GdipCloneStringFormat(GpStringFormat *format,
  1416. GpStringFormat **newFormat);
  1417. GpStatus GdipSetStringFormatFlags(GpStringFormat *format, INT flags);
  1418. GpStatus GdipGetStringFormatFlags(GpStringFormat *format,
  1419. INT *flags);
  1420. GpStatus GdipSetStringFormatAlign(GpStringFormat *format, StringAlignment _align);
  1421. GpStatus GdipGetStringFormatAlign(GpStringFormat *format,
  1422. StringAlignment *_align);
  1423. GpStatus GdipSetStringFormatLineAlign(GpStringFormat *format,
  1424. StringAlignment _align);
  1425. GpStatus GdipGetStringFormatLineAlign(GpStringFormat *format,
  1426. StringAlignment *_align);
  1427. GpStatus GdipSetStringFormatTrimming(
  1428. GpStringFormat *format,
  1429. StringTrimming trimming
  1430. );
  1431. GpStatus GdipGetStringFormatTrimming(
  1432. GpStringFormat *format,
  1433. StringTrimming *trimming
  1434. );
  1435. GpStatus GdipSetStringFormatHotkeyPrefix(GpStringFormat *format, INT hotkeyPrefix);
  1436. GpStatus GdipGetStringFormatHotkeyPrefix(GpStringFormat *format,
  1437. INT *hotkeyPrefix);
  1438. GpStatus GdipSetStringFormatTabStops(GpStringFormat *format, REAL firstTabOffset,
  1439. INT count, REAL *tabStops);
  1440. GpStatus GdipGetStringFormatTabStops(GpStringFormat *format, INT count,
  1441. REAL *firstTabOffset, REAL *tabStops);
  1442. GpStatus GdipGetStringFormatTabStopCount(GpStringFormat *format, INT * count);
  1443. GpStatus GdipSetStringFormatDigitSubstitution(GpStringFormat *format, LANGID language,
  1444. StringDigitSubstitute substitute);
  1445. GpStatus GdipGetStringFormatDigitSubstitution(GpStringFormat *format,
  1446. LANGID *language,
  1447. StringDigitSubstitute *substitute);
  1448. GpStatus GdipGetStringFormatMeasurableCharacterRangeCount(
  1449. GpStringFormat *format,
  1450. INT *count
  1451. );
  1452. GpStatus GdipSetStringFormatMeasurableCharacterRanges(
  1453. GpStringFormat *format,
  1454. INT rangeCount,
  1455. CharacterRange *ranges
  1456. );
  1457. //----------------------------------------------------------------------------
  1458. // Cached Bitmap APIs
  1459. //----------------------------------------------------------------------------
  1460. GpStatus GdipCreateCachedBitmap(
  1461. GpBitmap *bitmap,
  1462. GpGraphics *graphics,
  1463. GpCachedBitmap **cachedBitmap
  1464. );
  1465. GpStatus GdipDeleteCachedBitmap(GpCachedBitmap *cachedBitmap);
  1466. GpStatus GdipDrawCachedBitmap(
  1467. GpGraphics *graphics,
  1468. GpCachedBitmap *cachedBitmap,
  1469. INT x,
  1470. INT y
  1471. );
  1472. UINT GdipEmfToWmfBits(
  1473. HENHMETAFILE hemf,
  1474. UINT cbData16,
  1475. LPBYTE pData16,
  1476. INT iMapMode,
  1477. INT eFlags
  1478. );
  1479. GpStatus GdipSetImageAttributesCachedBackground(
  1480. GpImageAttributes *imageattr,
  1481. BOOL enableFlag
  1482. );
  1483. GpStatus GdipTestControl(
  1484. GpTestControlEnum control,
  1485. void * param
  1486. );
  1487. GpStatus GdiplusNotificationHook(
  1488. ULONG_PTR *token
  1489. );
  1490. VOID GdiplusNotificationUnhook(
  1491. ULONG_PTR token
  1492. );
  1493. version(GDIPLUS6) {
  1494. GpStatus GdipConvertToEmfPlus(
  1495. GpGraphics* refGraphics,
  1496. GpMetafile* metafile,
  1497. INT* conversionFailureFlag,
  1498. EmfType emfType,
  1499. WCHAR* description,
  1500. GpMetafile** out_metafile
  1501. );
  1502. GpStatus GdipConvertToEmfPlusToFile(
  1503. GpGraphics* refGraphics,
  1504. GpMetafile* metafile,
  1505. INT* conversionFailureFlag,
  1506. WCHAR* filename,
  1507. EmfType emfType,
  1508. WCHAR* description,
  1509. GpMetafile** out_metafile
  1510. );
  1511. /*GpStatus GdipConvertToEmfPlusToStream(
  1512. GpGraphics* refGraphics,
  1513. GpMetafile* metafile,
  1514. INT* conversionFailureFlag,
  1515. IStream* stream,
  1516. EmfType emfType,
  1517. WCHAR* description,
  1518. GpMetafile** out_metafile
  1519. );
  1520. */
  1521. }