[GDIPLUS]
authorChristoph von Wittich <christoph_vw@reactos.org>
Sun, 21 Mar 2010 19:20:42 +0000 (19:20 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Sun, 21 Mar 2010 19:20:42 +0000 (19:20 +0000)
sync gdiplus with wine 1.1.41

svn path=/trunk/; revision=46317

reactos/dll/win32/gdiplus/brush.c
reactos/dll/win32/gdiplus/image.c

index 2f2143d..2d28004 100644 (file)
@@ -865,7 +865,10 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image,
 
     (*texture)->brush.gdibrush = CreateBrushIndirect(&(*texture)->brush.lb);
     (*texture)->brush.bt = BrushTypeTextureFill;
-    (*texture)->wrap = imageattr->wrap;
+    if (imageattr)
+        (*texture)->wrap = imageattr->wrap;
+    else
+        (*texture)->wrap = WrapModeTile;
     (*texture)->image = new_image;
 
 exit:
index d72d4cf..58f3c65 100644 (file)
@@ -2108,6 +2108,8 @@ GpStatus WINGDIPAPI GdipGetMetafileHeaderFromMetafile(GpMetafile * metafile,
     if(!(calls++))
         FIXME("not implemented\n");
 
+    memset(header, 0, sizeof(MetafileHeader));
+
     return Ok;
 }
 
@@ -2194,6 +2196,7 @@ struct image_format_dimension image_format_dimensions[] =
     {NULL}
 };
 
+/* FIXME: Need to handle multi-framed images */
 GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage *image,
     GDIPCONST GUID* dimensionID, UINT* count)
 {
@@ -2201,13 +2204,15 @@ GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage *image,
 
     TRACE("(%p,%s,%p)\n", image, debugstr_guid(dimensionID), count);
 
-    if(!image || !dimensionID || !count)
+    if(!image || !count)
         return InvalidParameter;
 
     if(!(calls++))
-        FIXME("not implemented\n");
+        FIXME("returning frame count of 1\n");
 
-    return NotImplemented;
+    *count = 1;
+
+    return Ok;
 }
 
 GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage *image,