[3/8] gdiplus: added ImageAttributes stubs

Evan Stade estade at gmail.com
Mon Jul 30 21:09:41 CDT 2007


Hi,

changelog:
*added imageattributes.c
*added 3 stubs
*WrapMode and GpImageAttributes types

 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(-)

-- 
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/Makefile.in b/dlls/gdiplus/Makefile.in
index 75feb39..b56c068 100644
--- a/dlls/gdiplus/Makefile.in
+++ b/dlls/gdiplus/Makefile.in
@@ -13,6 +13,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 b05054b..a727ff3 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 0000000..81fd107
--- /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 ac9de4b..2d3c229 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 cd34bb6..7e2a84d 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -141,6 +141,11 @@ GpStatus WINGDIPAPI GdipGetImageVertical
 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 9d57648..30a04d2 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 GpPathIter
 typedef struct GpCustomLineCap GpCustomLineCap;
 typedef struct GpImage GpImage;
 typedef struct GpMetafile GpMetafile;
+typedef struct GpImageAttributes GpImageAttributes;
 
 #endif /* end of c declarations */
 
-- 
1.4.1


More information about the wine-patches mailing list