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

gdiplus: Added GdipCreateBitmapFromGraphics stub.

parent a41fa500
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
@ stdcall GdipCreateBitmapFromFile(wstr ptr) @ stdcall GdipCreateBitmapFromFile(wstr ptr)
@ stub GdipCreateBitmapFromFileICM @ stub GdipCreateBitmapFromFileICM
@ stub GdipCreateBitmapFromGdiDib @ stub GdipCreateBitmapFromGdiDib
@ stub GdipCreateBitmapFromGraphics @ stdcall GdipCreateBitmapFromGraphics(long long ptr ptr)
@ stub GdipCreateBitmapFromHBITMAP @ stub GdipCreateBitmapFromHBITMAP
@ stub GdipCreateBitmapFromHICON @ stub GdipCreateBitmapFromHICON
@ stub GdipCreateBitmapFromResource @ stub GdipCreateBitmapFromResource
......
...@@ -251,6 +251,26 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromFile(GDIPCONST WCHAR* filename, ...@@ -251,6 +251,26 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromFile(GDIPCONST WCHAR* filename,
return stat; 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, GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride,
PixelFormat format, BYTE* scan0, GpBitmap** bitmap) PixelFormat format, BYTE* scan0, GpBitmap** bitmap)
{ {
......
...@@ -185,6 +185,7 @@ GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap*,INT,INT,ARGB*); ...@@ -185,6 +185,7 @@ GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap*,INT,INT,ARGB*);
GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap*,GDIPCONST GpRect*,UINT, GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap*,GDIPCONST GpRect*,UINT,
PixelFormat,BitmapData*); PixelFormat,BitmapData*);
GpStatus WINGDIPAPI GdipCreateBitmapFromFile(GDIPCONST WCHAR*,GpBitmap**); GpStatus WINGDIPAPI GdipCreateBitmapFromFile(GDIPCONST WCHAR*,GpBitmap**);
GpStatus WINGDIPAPI GdipCreateBitmapFromGraphics(INT,INT,GpGraphics*,GpBitmap**);
GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT,INT,INT,PixelFormat,BYTE*, GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT,INT,INT,PixelFormat,BYTE*,
GpBitmap**); GpBitmap**);
GpStatus WINGDIPAPI GdipCreateBitmapFromStream(IStream*,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