Evan Stade : gdiplus: Use SaveDC, RestoreDC in GdipDrawLineI.
Module: wine Branch: master Commit: d9ef172e04397ffe4a14ba2c87a210e3ad87f45a URL: http://source.winehq.org/git/wine.git/?a=commit;h=d9ef172e04397ffe4a14ba2c87... Author: Evan Stade <estade(a)gmail.com> Date: Mon Jul 2 15:13:05 2007 -0700 gdiplus: Use SaveDC, RestoreDC in GdipDrawLineI. --- dlls/gdiplus/graphics.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 5ac16f7..453cbe5 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -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; }
participants (1)
-
Alexandre Julliard