https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1e83f8b5fd3105f5d17f9…
commit 1e83f8b5fd3105f5d17f9093c060aec6fcc01416
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed Jan 1 20:28:42 2020 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Jan 1 20:28:42 2020 +0900
[SDK][INCLUDE] Total refinement of Gdiplus headers (#2223)
Missing functions added. CORE-16585
---
sdk/include/psdk/gdiplusbase.h | 3 +++
sdk/include/psdk/gdiplusflat.h | 39 ++++++++++++++++++++++++++-
sdk/include/psdk/gdiplusgraphics.h | 8 ------
sdk/include/psdk/gdiplusheaders.h | 19 +-------------
sdk/include/psdk/gdiplusmetafile.h | 5 ----
sdk/include/psdk/gdipluspath.h | 54 ++++++++++----------------------------
sdk/include/psdk/gdipluspen.h | 8 ------
7 files changed, 56 insertions(+), 80 deletions(-)
diff --git a/sdk/include/psdk/gdiplusbase.h b/sdk/include/psdk/gdiplusbase.h
index 7eeb5156b5e..a7fc5431872 100644
--- a/sdk/include/psdk/gdiplusbase.h
+++ b/sdk/include/psdk/gdiplusbase.h
@@ -79,6 +79,9 @@ getNat(const Font *font);
GpFontCollection *&
getNat(const FontCollection *fc);
+GpFontFamily *&
+getNat(const FontFamily *ff);
+
GpGraphics *&
getNat(const Graphics *graphics);
diff --git a/sdk/include/psdk/gdiplusflat.h b/sdk/include/psdk/gdiplusflat.h
index 462301a75a6..83f4caba954 100644
--- a/sdk/include/psdk/gdiplusflat.h
+++ b/sdk/include/psdk/gdiplusflat.h
@@ -496,6 +496,8 @@ extern "C"
GpStatus WINGDIPAPI
GdipGetDpiY(GpGraphics *, REAL *);
GpStatus WINGDIPAPI
+ GdipGetEncoderParameterListSize(GpImage *, GDIPCONST CLSID *, UINT *);
+ GpStatus WINGDIPAPI
GdipGetImageDecoders(UINT, UINT, ImageCodecInfo *);
GpStatus WINGDIPAPI
GdipGetImageDecodersSize(UINT *, UINT *);
@@ -512,6 +514,8 @@ extern "C"
GpStatus WINGDIPAPI
GdipGetPixelOffsetMode(GpGraphics *, PixelOffsetMode *);
GpStatus WINGDIPAPI
+ GdipGetRenderingOrigin(GpGraphics *, INT *, INT *);
+ GpStatus WINGDIPAPI
GdipGetSmoothingMode(GpGraphics *, SmoothingMode *);
GpStatus WINGDIPAPI
GdipGetTextContrast(GpGraphics *, UINT *);
@@ -532,6 +536,8 @@ extern "C"
GpStatus WINGDIPAPI
GdipIsClipEmpty(GpGraphics *, BOOL *);
GpStatus WINGDIPAPI
+ GdipIsVisibleClipEmpty(GpGraphics *, BOOL *);
+ GpStatus WINGDIPAPI
GdipIsVisiblePoint(GpGraphics *, REAL, REAL, BOOL *);
GpStatus WINGDIPAPI
GdipIsVisiblePointI(GpGraphics *, INT, INT, BOOL *);
@@ -603,6 +609,8 @@ extern "C"
GpStatus WINGDIPAPI
GdipRotateWorldTransform(GpGraphics *, REAL, GpMatrixOrder);
GpStatus WINGDIPAPI
+ GdipSaveAdd(GpImage *, GDIPCONST EncoderParameters *);
+ GpStatus WINGDIPAPI
GdipSaveGraphics(GpGraphics *, GraphicsState *);
GpStatus WINGDIPAPI
GdipScaleWorldTransform(GpGraphics *, REAL, REAL, GpMatrixOrder);
@@ -794,6 +802,8 @@ extern "C"
GdipWarpPath(GpPath *, GpMatrix *, GDIPCONST GpPointF *, INT, REAL, REAL, REAL, REAL,
WarpMode, REAL);
GpStatus WINGDIPAPI
GdipWidenPath(GpPath *, GpPen *, GpMatrix *, REAL);
+ GpStatus WINGDIPAPI
+ GdipWindingModeOutline(GpPath *, GpMatrix *, REAL);
/* HatchBrush */
GpStatus WINGDIPAPI
@@ -1071,6 +1081,15 @@ extern "C"
GdipSetMetafileDownLevelRasterizationLimit(GpMetafile *, UINT);
GpStatus WINGDIPAPI
GdipRecordMetafile(HDC, EmfType, GDIPCONST GpRectF *, MetafileFrameUnit, GDIPCONST
WCHAR *, GpMetafile **);
+ GpStatus WINGDIPAPI
+ GdipRecordMetafileStream(
+ IStream *,
+ HDC,
+ EmfType,
+ GDIPCONST GpRectF *,
+ MetafileFrameUnit,
+ GDIPCONST WCHAR *,
+ GpMetafile **);
/* MetafileHeader */
GpStatus WINGDIPAPI
@@ -1125,10 +1144,24 @@ extern "C"
GpStatus WINGDIPAPI
GdipGetPathGradientRectI(GpPathGradient *, GpRect *);
GpStatus WINGDIPAPI
+ GdipGetPathGradientSurroundColorCount(GpPathGradient *, INT *);
+ GpStatus WINGDIPAPI
GdipGetPathGradientSurroundColorsWithCount(GpPathGradient *, ARGB *, INT *);
GpStatus WINGDIPAPI
+ GdipGetPathGradientTransform(GpPathGradient *, GpMatrix *);
+ GpStatus WINGDIPAPI
GdipGetPathGradientWrapMode(GpPathGradient *, GpWrapMode *);
GpStatus WINGDIPAPI
+ GdipMultiplyPathGradientTransform(GpPathGradient *, GDIPCONST GpMatrix *,
GpMatrixOrder);
+ GpStatus WINGDIPAPI
+ GdipResetPathGradientTransform(GpPathGradient *);
+ GpStatus WINGDIPAPI
+ GdipRotatePathGradientTransform(GpPathGradient *, REAL, GpMatrixOrder);
+ GpStatus WINGDIPAPI
+ GdipScalePathGradientTransform(GpPathGradient *, REAL, REAL, GpMatrixOrder);
+ GpStatus WINGDIPAPI
+ GdipSetPathGradientLinearBlend(GpPathGradient *, REAL, REAL);
+ GpStatus WINGDIPAPI
GdipSetPathGradientBlend(GpPathGradient *, GDIPCONST REAL *, GDIPCONST REAL *, INT);
GpStatus WINGDIPAPI
GdipSetPathGradientCenterColor(GpPathGradient *, ARGB);
@@ -1147,9 +1180,11 @@ extern "C"
GpStatus WINGDIPAPI
GdipSetPathGradientSurroundColorsWithCount(GpPathGradient *, GDIPCONST ARGB *, INT
*);
GpStatus WINGDIPAPI
+ GdipSetPathGradientTransform(GpPathGradient *, GpMatrix *);
+ GpStatus WINGDIPAPI
GdipSetPathGradientWrapMode(GpPathGradient *, GpWrapMode);
GpStatus WINGDIPAPI
- GdipGetPathGradientSurroundColorCount(GpPathGradient *, INT *);
+ GdipTranslatePathGradientTransform(GpPathGradient *, REAL, REAL, GpMatrixOrder);
/* PathIterator */
GpStatus WINGDIPAPI
@@ -1405,6 +1440,8 @@ extern "C"
GpStatus WINGDIPAPI
GdipCreateTextureIAI(GpImage *, GDIPCONST GpImageAttributes *, INT, INT, INT, INT,
GpTexture **);
GpStatus WINGDIPAPI
+ GdipGetTextureImage(GpTexture *, GpImage **);
+ GpStatus WINGDIPAPI
GdipGetTextureTransform(GpTexture *, GpMatrix *);
GpStatus WINGDIPAPI
GdipGetTextureWrapMode(GpTexture *, GpWrapMode *);
diff --git a/sdk/include/psdk/gdiplusgraphics.h b/sdk/include/psdk/gdiplusgraphics.h
index 4f7bfff799f..4704bd57067 100644
--- a/sdk/include/psdk/gdiplusgraphics.h
+++ b/sdk/include/psdk/gdiplusgraphics.h
@@ -1084,11 +1084,7 @@ class Graphics : public GdiplusBase
Status
GetRenderingOrigin(INT *x, INT *y) const
{
-#if 1
- return SetStatus(NotImplemented); // FIXME
-#else
return SetStatus(DllExports::GdipGetRenderingOrigin(nativeGraphics, x, y));
-#endif
}
SmoothingMode
@@ -1240,13 +1236,9 @@ class Graphics : public GdiplusBase
BOOL
IsVisibleClipEmpty() const
{
-#if 1
- return FALSE; // FIXME
-#else
BOOL flag = FALSE;
SetStatus(DllExports::GdipIsVisibleClipEmpty(nativeGraphics, &flag));
return flag;
-#endif
}
Status
diff --git a/sdk/include/psdk/gdiplusheaders.h b/sdk/include/psdk/gdiplusheaders.h
index d839ce324ff..f78fdaae662 100644
--- a/sdk/include/psdk/gdiplusheaders.h
+++ b/sdk/include/psdk/gdiplusheaders.h
@@ -84,7 +84,6 @@ class Image : public GdiplusBase
GetEncoderParameterList(const CLSID *clsidEncoder, UINT size, EncoderParameters
*buffer)
{
#if 1
- // FIXME: Not available yet
return SetStatus(NotImplemented);
#else
return SetStatus(DllExports::GdipGetEncoderParameterList(nativeImage,
clsidEncoder, size, buffer));
@@ -94,14 +93,9 @@ class Image : public GdiplusBase
UINT
GetEncoderParameterListSize(const CLSID *clsidEncoder)
{
-#if 1
- // FIXME: Not available yet
- return SetStatus(NotImplemented);
-#else
UINT size = 0;
SetStatus(DllExports::GdipGetEncoderParameterListSize(nativeImage, clsidEncoder,
&size));
return size;
-#endif
}
UINT
@@ -292,12 +286,7 @@ class Image : public GdiplusBase
Status
SaveAdd(const EncoderParameters *encoderParams)
{
-#if 1
- // FIXME: Not available yet
- return SetStatus(NotImplemented);
-#else
return SetStatus(DllExports::GdipSaveAdd(nativeImage, encoderParams));
-#endif
}
Status
@@ -1457,10 +1446,8 @@ class CustomLineCap : public GdiplusBase
{
}
- CustomLineCap(GpCustomLineCap *nativeCap, Status status)
+ CustomLineCap(GpCustomLineCap *cap, Status status) : nativeCap(cap),
lastStatus(status)
{
- lastStatus = status;
- SetNativeCap(nativeCap);
}
void
@@ -1494,9 +1481,6 @@ class CustomLineCap : public GdiplusBase
inline Image *
TextureBrush::GetImage() const
{
-#if 1
- return NULL; // FIXME
-#else
GpImage *image = NULL;
GpTexture *texture = GetNativeTexture();
SetStatus(DllExports::GdipGetTextureImage(texture, &image));
@@ -1507,7 +1491,6 @@ TextureBrush::GetImage() const
if (!newImage)
DllExports::GdipDisposeImage(image);
return newImage;
-#endif
}
#endif /* _GDIPLUSHEADERS_H */
diff --git a/sdk/include/psdk/gdiplusmetafile.h b/sdk/include/psdk/gdiplusmetafile.h
index 9a217200272..126a10501e7 100644
--- a/sdk/include/psdk/gdiplusmetafile.h
+++ b/sdk/include/psdk/gdiplusmetafile.h
@@ -85,15 +85,10 @@ class Metafile : public Image
Metafile(IStream *stream, HDC referenceHdc, EmfType type = EmfTypeEmfPlusDual, const
WCHAR *description = NULL)
{
-#if 1
- // FIXME
- SetNativeImage(NULL);
-#else
GpMetafile *metafile = NULL;
lastStatus = DllExports::GdipRecordMetafileStream(
stream, referenceHdc, type, NULL, MetafileFrameUnitGdi, description,
&metafile);
SetNativeImage(metafile);
-#endif
}
Metafile(
diff --git a/sdk/include/psdk/gdipluspath.h b/sdk/include/psdk/gdipluspath.h
index 2665bccbb0a..1496880decf 100644
--- a/sdk/include/psdk/gdipluspath.h
+++ b/sdk/include/psdk/gdipluspath.h
@@ -304,7 +304,9 @@ class GraphicsPath : public GdiplusBase
const Rect &layoutRect,
const StringFormat *format)
{
- return SetStatus(NotImplemented);
+ return SetStatus(DllExports::GdipAddPathStringI(
+ nativePath, string, length, family ? getNat(family) : NULL, style, emSize,
&layoutRect,
+ format ? getNat(format) : NULL));
}
Status
@@ -317,7 +319,10 @@ class GraphicsPath : public GdiplusBase
const PointF &origin,
const StringFormat *format)
{
- return SetStatus(NotImplemented);
+ RectF rect(origin.X, origin.Y, 0.0f, 0.0f);
+ return SetStatus(DllExports::GdipAddPathString(
+ nativePath, string, length, family ? getNat(family) : NULL, style, emSize,
&rect,
+ format ? getNat(format) : NULL));
}
Status
@@ -330,7 +335,10 @@ class GraphicsPath : public GdiplusBase
const Point &origin,
const StringFormat *format)
{
- return SetStatus(NotImplemented);
+ Rect rect(origin.X, origin.Y, 0, 0);
+ return SetStatus(DllExports::GdipAddPathStringI(
+ nativePath, string, length, family ? getNat(family) : NULL, style, emSize,
&rect,
+ format ? getNat(format) : NULL));
}
Status
@@ -343,7 +351,9 @@ class GraphicsPath : public GdiplusBase
const RectF &layoutRect,
const StringFormat *format)
{
- return SetStatus(NotImplemented);
+ return SetStatus(DllExports::GdipAddPathString(
+ nativePath, string, length, family ? getNat(family) : NULL, style, emSize,
&layoutRect,
+ format ? getNat(format) : NULL));
}
Status
@@ -510,12 +520,8 @@ class GraphicsPath : public GdiplusBase
Status
Outline(const Matrix *matrix, REAL flatness)
{
-#if 1
- return SetStatus(NotImplemented); // FIXME
-#else
GpMatrix *nativeMatrix = matrix ? getNat(matrix) : NULL;
return SetStatus(DllExports::GdipWindingModeOutline(nativePath, nativeMatrix,
flatness));
-#endif
}
Status
@@ -879,11 +885,7 @@ class PathGradientBrush : public Brush
Status
GetTransform(Matrix *matrix) const
{
-#if 1
- return SetStatus(NotImplemented);
-#else
return SetStatus(DllExports::GdipGetPathGradientTransform(GetNativeGradient(),
getNat(matrix)));
-#endif
}
WrapMode
@@ -897,41 +899,25 @@ class PathGradientBrush : public Brush
Status
MultiplyTransform(Matrix *matrix, MatrixOrder order = MatrixOrderPrepend)
{
-#if 1
- return SetStatus(NotImplemented);
-#else
return
SetStatus(DllExports::GdipMultiplyPathGradientTransform(GetNativeGradient(),
getNat(matrix), order));
-#endif
}
Status
ResetTransform()
{
-#if 1
- return SetStatus(NotImplemented);
-#else
return
SetStatus(DllExports::GdipResetPathGradientTransform(GetNativeGradient()));
-#endif
}
Status
RotateTransform(REAL angle, MatrixOrder order = MatrixOrderPrepend)
{
-#if 1
- return SetStatus(NotImplemented);
-#else
return SetStatus(DllExports::GdipRotatePathGradientTransform(GetNativeGradient(),
angle, order));
-#endif
}
Status
ScaleTransform(REAL sx, REAL sy, MatrixOrder order = MatrixOrderPrepend)
{
-#if 1
- return SetStatus(NotImplemented);
-#else
return SetStatus(DllExports::GdipScalePathGradientTransform(GetNativeGradient(),
sx, sy, order));
-#endif
}
Status
@@ -950,11 +936,7 @@ class PathGradientBrush : public Brush
Status
SetBlendTriangularShape(REAL focus, REAL scale = 1.0f)
{
-#if 1
- return SetStatus(NotImplemented);
-#else
return SetStatus(DllExports::GdipSetPathGradientLinearBlend(GetNativeGradient(),
focus, scale));
-#endif
}
Status
@@ -1010,11 +992,7 @@ class PathGradientBrush : public Brush
Status
SetTransform(const Matrix *matrix)
{
-#if 1
- return SetStatus(NotImplemented);
-#else
return SetStatus(DllExports::GdipSetPathGradientTransform(GetNativeGradient(),
getNat(matrix)));
-#endif
}
Status
@@ -1026,11 +1004,7 @@ class PathGradientBrush : public Brush
Status
TranslateTransform(REAL dx, REAL dy, MatrixOrder order = MatrixOrderPrepend)
{
-#if 1
- return SetStatus(NotImplemented);
-#else
return
SetStatus(DllExports::GdipTranslatePathGradientTransform(GetNativeGradient(), dx, dy,
order));
-#endif
}
protected:
diff --git a/sdk/include/psdk/gdipluspen.h b/sdk/include/psdk/gdipluspen.h
index 58c08a4ed98..3a55e1496b3 100644
--- a/sdk/include/psdk/gdipluspen.h
+++ b/sdk/include/psdk/gdipluspen.h
@@ -106,11 +106,7 @@ class Pen : public GdiplusBase
if (!customCap)
return SetStatus(InvalidParameter);
-#if 1
- return SetStatus(NotImplemented);
-#else
return SetStatus(DllExports::GdipGetPenCustomEndCap(nativePen,
&getNat(customCap)));
-#endif
}
Status
@@ -226,11 +222,7 @@ class Pen : public GdiplusBase
Status
MultiplyTransform(Matrix *matrix, MatrixOrder order = MatrixOrderPrepend)
{
-#if 1
- return SetStatus(NotImplemented);
-#else
return SetStatus(DllExports::GdipMultiplyPenTransform(nativePen, getNat(matrix),
order));
-#endif
}
Status