gdiplus: Added GdipCreateBitmapFromGraphics stub.

This commit is contained in:
Evan Stade 2007-08-08 19:42:28 -07:00 committed by Alexandre Julliard
parent a41fa500f4
commit ad8ea1b0a6
3 changed files with 22 additions and 1 deletions

View File

@ -74,7 +74,7 @@
@ stdcall GdipCreateBitmapFromFile(wstr ptr)
@ stub GdipCreateBitmapFromFileICM
@ stub GdipCreateBitmapFromGdiDib
@ stub GdipCreateBitmapFromGraphics
@ stdcall GdipCreateBitmapFromGraphics(long long ptr ptr)
@ stub GdipCreateBitmapFromHBITMAP
@ stub GdipCreateBitmapFromHICON
@ stub GdipCreateBitmapFromResource

View File

@ -251,6 +251,26 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromFile(GDIPCONST WCHAR* filename,
return stat;
}
/* FIXME: this should create a bitmap in the given size with the attributes
* (resolution etc.) of the graphics object */
GpStatus WINGDIPAPI GdipCreateBitmapFromGraphics(INT width, INT height,
GpGraphics* target, GpBitmap** bitmap)
{
static int calls;
GpStatus ret;
if(!target || !bitmap)
return InvalidParameter;
if(!(calls++))
FIXME("hacked stub\n");
ret = GdipCreateBitmapFromScan0(width, height, 0, PixelFormat24bppRGB,
NULL, bitmap);
return ret;
}
GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride,
PixelFormat format, BYTE* scan0, GpBitmap** bitmap)
{

View File

@ -185,6 +185,7 @@ GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap*,INT,INT,ARGB*);
GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap*,GDIPCONST GpRect*,UINT,
PixelFormat,BitmapData*);
GpStatus WINGDIPAPI GdipCreateBitmapFromFile(GDIPCONST WCHAR*,GpBitmap**);
GpStatus WINGDIPAPI GdipCreateBitmapFromGraphics(INT,INT,GpGraphics*,GpBitmap**);
GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT,INT,INT,PixelFormat,BYTE*,
GpBitmap**);
GpStatus WINGDIPAPI GdipCreateBitmapFromStream(IStream*,GpBitmap**);