Commit ad8ea1b0 authored by Evan Stade's avatar Evan Stade Committed by Alexandre Julliard

gdiplus: Added GdipCreateBitmapFromGraphics stub.

parent a41fa500
......@@ -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
......
......@@ -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)
{
......
......@@ -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**);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment