From 5dd58254843f9841da826076c27421deca8e8ea8 Mon Sep 17 00:00:00 2001 From: Evan Stade Date: Mon, 30 Jul 2007 19:09:41 -0700 Subject: [PATCH] gdiplus: Added ImageAttributes stubs. --- dlls/gdiplus/Makefile.in | 1 + dlls/gdiplus/gdiplus.spec | 6 ++-- dlls/gdiplus/imageattributes.c | 65 ++++++++++++++++++++++++++++++++++ include/gdiplusenums.h | 10 ++++++ include/gdiplusflat.h | 5 +++ include/gdiplusgpstubs.h | 2 ++ 6 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 dlls/gdiplus/imageattributes.c diff --git a/dlls/gdiplus/Makefile.in b/dlls/gdiplus/Makefile.in index 8efc6d6994..d651c4cd68 100644 --- a/dlls/gdiplus/Makefile.in +++ b/dlls/gdiplus/Makefile.in @@ -14,6 +14,7 @@ C_SRCS = \ graphics.c \ graphicspath.c \ image.c \ + imageattributes.c \ matrix.c \ pathiterator.c \ pen.c diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index b05054b01b..a727ff3343 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -88,7 +88,7 @@ @ stub GdipCreateHICONFromBitmap @ stub GdipCreateHalftonePalette @ stub GdipCreateHatchBrush -@ stub GdipCreateImageAttributes +@ stdcall GdipCreateImageAttributes(ptr) @ stub GdipCreateLineBrush @ stub GdipCreateLineBrushFromRect @ stub GdipCreateLineBrushFromRectI @@ -141,7 +141,7 @@ @ stub GdipDeleteRegion @ stub GdipDeleteStringFormat @ stdcall GdipDisposeImage(ptr) -@ stub GdipDisposeImageAttributes +@ stdcall GdipDisposeImageAttributes(ptr) @ stdcall GdipDrawArc(ptr ptr long long long long long long) @ stub GdipDrawArcI @ stdcall GdipDrawBezier(ptr ptr long long long long long long long long) @@ -510,7 +510,7 @@ @ stub GdipSetImageAttributesRemapTable @ stub GdipSetImageAttributesThreshold @ stub GdipSetImageAttributesToIdentity -@ stub GdipSetImageAttributesWrapMode +@ stdcall GdipSetImageAttributesWrapMode(ptr long long long) @ stub GdipSetImagePalette @ stub GdipSetInfinite @ stdcall GdipSetInterpolationMode(ptr long) diff --git a/dlls/gdiplus/imageattributes.c b/dlls/gdiplus/imageattributes.c new file mode 100644 index 0000000000..81fd107558 --- /dev/null +++ b/dlls/gdiplus/imageattributes.c @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2007 Google (Evan Stade) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "windef.h" + +#include "gdiplus.h" +#include "gdiplus_private.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(gdiplus); + +GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes **imageattr) +{ + static int calls; + + if(!imageattr) + return InvalidParameter; + + if(!(calls++)) + FIXME("not implemented\n"); + + return NotImplemented; +} + +GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes *imageattr) +{ + static int calls; + + if(!imageattr) + return InvalidParameter; + + if(!(calls++)) + FIXME("not implemented\n"); + + return NotImplemented; +} + +GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes *imageAttr, + WrapMode wrap, ARGB argb, BOOL clamp) +{ + static int calls; + + if(!imageAttr) + return InvalidParameter; + + if(!(calls++)) + FIXME("not implemented\n"); + + return NotImplemented; +} diff --git a/include/gdiplusenums.h b/include/gdiplusenums.h index ac9de4b32d..2d3c22988c 100644 --- a/include/gdiplusenums.h +++ b/include/gdiplusenums.h @@ -164,6 +164,15 @@ enum ImageType ImageTypeMetafile }; +enum WrapMode +{ + WrapModeTile, + WrapModeTileFlipX, + WrapModeTileFlipY, + WrapModeTileFlipXY, + WrapModeClamp +}; + #ifndef __cplusplus typedef enum Unit Unit; @@ -181,6 +190,7 @@ typedef enum DashCap DashCap; typedef enum DashStyle DashStyle; typedef enum MatrixOrder MatrixOrder; typedef enum ImageType ImageType; +typedef enum WrapMode WrapMode; #endif /* end of c typedefs */ diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index cd34bb6667..7e2a84d5f1 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -141,6 +141,11 @@ GpStatus WINGDIPAPI GdipGetImageVerticalResolution(GpImage*,REAL*); GpStatus WINGDIPAPI GdipGetImageWidth(GpImage*,UINT*); GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage*,GDIPCONST GUID*,UINT*); +GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes**); +GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes*); +GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes*,WrapMode, + ARGB,BOOL); + #ifdef __cplusplus } #endif diff --git a/include/gdiplusgpstubs.h b/include/gdiplusgpstubs.h index 9d57648372..30a04d222c 100644 --- a/include/gdiplusgpstubs.h +++ b/include/gdiplusgpstubs.h @@ -31,6 +31,7 @@ class GpPathIterator {}; class GpCustomLineCap {}; class GpImage {}; class GpMetafile : public GpImage {}; +class GpImageAttributes {}; #else /* end of c++ declarations */ @@ -44,6 +45,7 @@ typedef struct GpPathIterator GpPathIterator; typedef struct GpCustomLineCap GpCustomLineCap; typedef struct GpImage GpImage; typedef struct GpMetafile GpMetafile; +typedef struct GpImageAttributes GpImageAttributes; #endif /* end of c declarations */