mirror of
https://github.com/reactos/reactos.git
synced 2025-02-20 15:35:04 +00:00
[SDK][INCLUDE] Total refinement of Gdiplus headers (#2223)
Missing functions added. CORE-16585
This commit is contained in:
parent
265a890d7c
commit
1e83f8b5fd
7 changed files with 56 additions and 80 deletions
|
@ -79,6 +79,9 @@ getNat(const Font *font);
|
|||
GpFontCollection *&
|
||||
getNat(const FontCollection *fc);
|
||||
|
||||
GpFontFamily *&
|
||||
getNat(const FontFamily *ff);
|
||||
|
||||
GpGraphics *&
|
||||
getNat(const Graphics *graphics);
|
||||
|
||||
|
|
|
@ -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 *);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue