gdiplus: Store a reference to the image in image graphics contexts.
This commit is contained in:
parent
ffc9397664
commit
af7b8efc94
|
@ -112,6 +112,7 @@ struct GpGraphics{
|
|||
HDC hdc;
|
||||
HWND hwnd;
|
||||
BOOL owndc;
|
||||
GpImage *image;
|
||||
SmoothingMode smoothing;
|
||||
CompositingQuality compqual;
|
||||
InterpolationMode interpolation;
|
||||
|
|
|
@ -1946,6 +1946,7 @@ GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage *image,
|
|||
GpGraphics **graphics)
|
||||
{
|
||||
HDC hdc;
|
||||
GpStatus stat;
|
||||
|
||||
TRACE("%p %p\n", image, graphics);
|
||||
|
||||
|
@ -1965,7 +1966,12 @@ GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage *image,
|
|||
((GpBitmap*)image)->hdc = hdc;
|
||||
}
|
||||
|
||||
return GdipCreateFromHDC(hdc, graphics);
|
||||
stat = GdipCreateFromHDC(hdc, graphics);
|
||||
|
||||
if (stat == Ok)
|
||||
(*graphics)->image = image;
|
||||
|
||||
return stat;
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipGetImageHeight(GpImage *image, UINT *height)
|
||||
|
|
Loading…
Reference in New Issue