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;
|
HDC hdc;
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
BOOL owndc;
|
BOOL owndc;
|
||||||
|
GpImage *image;
|
||||||
SmoothingMode smoothing;
|
SmoothingMode smoothing;
|
||||||
CompositingQuality compqual;
|
CompositingQuality compqual;
|
||||||
InterpolationMode interpolation;
|
InterpolationMode interpolation;
|
||||||
|
@ -1946,6 +1946,7 @@ GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage *image,
|
|||||||
GpGraphics **graphics)
|
GpGraphics **graphics)
|
||||||
{
|
{
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
|
GpStatus stat;
|
||||||
|
|
||||||
TRACE("%p %p\n", image, graphics);
|
TRACE("%p %p\n", image, graphics);
|
||||||
|
|
||||||
@ -1965,7 +1966,12 @@ GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage *image,
|
|||||||
((GpBitmap*)image)->hdc = hdc;
|
((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)
|
GpStatus WINGDIPAPI GdipGetImageHeight(GpImage *image, UINT *height)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user