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

gdiplus: Use SaveDC, RestoreDC in GdipDrawLineI.

parent 8fae3635
......@@ -247,15 +247,18 @@ GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics *graphics, GpPen *pen,
GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics *graphics, GpPen *pen, INT x1,
INT y1, INT x2, INT y2)
{
HGDIOBJ old_obj;
INT save_state;
if(!pen || !graphics)
return InvalidParameter;
old_obj = SelectObject(graphics->hdc, pen->gdipen);
save_state = SaveDC(graphics->hdc);
SelectObject(graphics->hdc, pen->gdipen);
MoveToEx(graphics->hdc, x1, y1, NULL);
LineTo(graphics->hdc, x2, y2);
SelectObject(graphics->hdc, old_obj);
RestoreDC(graphics->hdc, save_state);
return Ok;
}
......
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