mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
gdiplus: Added GdipGetImageGraphicsContext.
This commit is contained in:
parent
ef7a7794ca
commit
94a19d1f75
@ -287,7 +287,7 @@
|
||||
@ stub GdipGetImageEncoders
|
||||
@ stub GdipGetImageEncodersSize
|
||||
@ stub GdipGetImageFlags
|
||||
@ stub GdipGetImageGraphicsContext
|
||||
@ stdcall GdipGetImageGraphicsContext(ptr ptr)
|
||||
@ stdcall GdipGetImageHeight(ptr ptr)
|
||||
@ stdcall GdipGetImageHorizontalResolution(ptr ptr)
|
||||
@ stub GdipGetImageItemData
|
||||
|
@ -384,9 +384,13 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromStreamICM(IStream* stream,
|
||||
|
||||
GpStatus WINGDIPAPI GdipDisposeImage(GpImage *image)
|
||||
{
|
||||
HDC hdc;
|
||||
|
||||
if(!image)
|
||||
return InvalidParameter;
|
||||
|
||||
IPicture_get_CurDC(image->picture, &hdc);
|
||||
DeleteDC(hdc);
|
||||
IPicture_Release(image->picture);
|
||||
GdipFree(image);
|
||||
|
||||
@ -429,6 +433,29 @@ GpStatus WINGDIPAPI GdipGetImageBounds(GpImage *image, GpRectF *srcRect,
|
||||
return Ok;
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage *image,
|
||||
GpGraphics **graphics)
|
||||
{
|
||||
HDC hdc;
|
||||
|
||||
if(!image || !graphics)
|
||||
return InvalidParameter;
|
||||
|
||||
if(image->type != ImageTypeBitmap){
|
||||
FIXME("not implemented for image type %d\n", image->type);
|
||||
return NotImplemented;
|
||||
}
|
||||
|
||||
IPicture_get_CurDC(image->picture, &hdc);
|
||||
|
||||
if(!hdc){
|
||||
hdc = CreateCompatibleDC(0);
|
||||
IPicture_SelectPicture(image->picture, hdc, NULL, NULL);
|
||||
}
|
||||
|
||||
return GdipCreateFromHDC(hdc, graphics);
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipGetImageHeight(GpImage *image, UINT *height)
|
||||
{
|
||||
if(!image || !height)
|
||||
|
@ -192,6 +192,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromStream(IStream*,GpBitmap**);
|
||||
GpStatus WINGDIPAPI GdipCreateBitmapFromStreamICM(IStream*,GpBitmap**);
|
||||
GpStatus WINGDIPAPI GdipDisposeImage(GpImage*);
|
||||
GpStatus WINGDIPAPI GdipGetImageBounds(GpImage*,GpRectF*,GpUnit*);
|
||||
GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage*,GpGraphics**);
|
||||
GpStatus WINGDIPAPI GdipGetImageHeight(GpImage*,UINT*);
|
||||
GpStatus WINGDIPAPI GdipGetImageHorizontalResolution(GpImage*,REAL*);
|
||||
GpStatus WINGDIPAPI GdipGetImagePixelFormat(GpImage*,PixelFormat*);
|
||||
|
Loading…
Reference in New Issue
Block a user