Commit af7b8efc authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Store a reference to the image in image graphics contexts.

parent ffc93976
......@@ -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)
......
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