Module: wine Branch: master Commit: 021997fa636391f8b694cec76cba783b1b1b70f4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=021997fa636391f8b694cec76c...
Author: Evan Stade estade@gmail.com Date: Tue Jul 24 17:19:15 2007 -0700
gdiplus: Added GdipCreateMetafileFromWmf stub.
---
dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphics.c | 14 +++++++++++++ include/Makefile.in | 1 + include/gdiplus.h | 2 + include/gdiplusflat.h | 2 + include/gdiplusmetaheader.h | 44 +++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 64 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 52179ec..5d2c3bd 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -102,7 +102,7 @@ @ stdcall GdipCreateMetafileFromEmf(ptr long ptr) @ stub GdipCreateMetafileFromFile @ stub GdipCreateMetafileFromStream -@ stub GdipCreateMetafileFromWmf +@ stdcall GdipCreateMetafileFromWmf(ptr long ptr ptr) @ stub GdipCreateMetafileFromWmfFile @ stub GdipCreatePath2 @ stub GdipCreatePath2I diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index a29d3a1..f53ea4c 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -818,6 +818,20 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromEmf(HENHMETAFILE hemf, BOOL delete, return NotImplemented; }
+GpStatus WINGDIPAPI GdipCreateMetafileFromWmf(HMETAFILE hwmf, BOOL delete, + GDIPCONST WmfPlaceableFileHeader * placeable, GpMetafile **metafile) +{ + static int calls; + + if(!hwmf || !metafile || !placeable) + return InvalidParameter; + + if(!(calls++)) + FIXME("not implemented\n"); + + return NotImplemented; +} + GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics) { if(!graphics) return InvalidParameter; diff --git a/include/Makefile.in b/include/Makefile.in index 782e671..44ef893 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -169,6 +169,7 @@ SRCDIR_INCLUDES = \ gdiplusgpstubs.h \ gdiplusinit.h \ gdiplusmem.h \ + gdiplusmetaheader.h \ gdipluspixelformats.h \ gdiplustypes.h \ guiddef.h \ diff --git a/include/gdiplus.h b/include/gdiplus.h index e5da625..6b42093 100644 --- a/include/gdiplus.h +++ b/include/gdiplus.h @@ -32,6 +32,7 @@ namespace Gdiplus #include "gdiplusenums.h" #include "gdiplusinit.h" #include "gdipluspixelformats.h" +#include "gdiplusmetaheader.h" #include "gdiplusgpstubs.h"
namespace DllExports @@ -48,6 +49,7 @@ namespace Gdiplus #include "gdiplusenums.h" #include "gdiplusinit.h" #include "gdipluspixelformats.h" +#include "gdiplusmetaheader.h" #include "gdiplusgpstubs.h"
#include "gdiplusflat.h" diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 2df7b7c..bfa2c41 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -47,6 +47,8 @@ GpStatus WINGDIPAPI GdipSetPenStartCap(GpPen*,GpLineCap); GpStatus WINGDIPAPI GdipCreateFromHDC(HDC,GpGraphics**); GpStatus WINGDIPAPI GdipCreateFromHWND(HWND,GpGraphics**); GpStatus WINGDIPAPI GdipCreateMetafileFromEmf(HENHMETAFILE,BOOL,GpMetafile**); +GpStatus WINGDIPAPI GdipCreateMetafileFromWmf(HMETAFILE,BOOL, + GDIPCONST WmfPlaceableFileHeader*,GpMetafile**); GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *); GpStatus WINGDIPAPI GdipDrawArc(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipDrawBezier(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL, diff --git a/include/gdiplusmetaheader.h b/include/gdiplusmetaheader.h new file mode 100644 index 0000000..2b4adf6 --- /dev/null +++ b/include/gdiplusmetaheader.h @@ -0,0 +1,44 @@ +/* + * 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 + */ + +#ifndef _GDIPLUSMETAHEADER_H +#define _GDIPLUSMETAHEADER_H + +#include <pshpack2.h> + +typedef struct +{ + INT16 Left; + INT16 Top; + INT16 Right; + INT16 Bottom; +} PWMFRect16; + +typedef struct +{ + UINT32 Key; + INT16 Hmf; + PWMFRect16 BoundingBox; + INT16 Inch; + UINT32 Reserved; + INT16 Checksum; +} WmfPlaceableFileHeader; + +#include <poppack.h> + +#endif /* _GDIPLUSMETAHEADER_H */