Dmitry Timoshkov : gdiplus: Forward GdipDrawLine to GdipDrawLines.

Alexandre Julliard julliard at winehq.org
Mon Feb 18 13:27:05 CST 2013


Module: wine
Branch: master
Commit: 0ed65a2d3aee55851eb7ebe3d57c66f330a22ddb
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0ed65a2d3aee55851eb7ebe3d57c66f330a22ddb

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Mon Feb 18 11:37:19 2013 +0800

gdiplus: Forward GdipDrawLine to GdipDrawLines.

---

 dlls/gdiplus/graphics.c |   23 +----------------------
 1 files changed, 1 insertions(+), 22 deletions(-)

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 659c46b..667ead3 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -3525,36 +3525,15 @@ GpStatus WINGDIPAPI GdipDrawImageRectI(GpGraphics *graphics, GpImage *image,
 GpStatus WINGDIPAPI GdipDrawLine(GpGraphics *graphics, GpPen *pen, REAL x1,
     REAL y1, REAL x2, REAL y2)
 {
-    INT save_state;
     GpPointF pt[2];
-    GpStatus retval;
 
     TRACE("(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen, x1, y1, x2, y2);
 
-    if(!pen || !graphics)
-        return InvalidParameter;
-
-    if(graphics->busy)
-        return ObjectBusy;
-
-    if (!graphics->hdc)
-    {
-        FIXME("graphics object has no HDC\n");
-        return Ok;
-    }
-
     pt[0].X = x1;
     pt[0].Y = y1;
     pt[1].X = x2;
     pt[1].Y = y2;
-
-    save_state = prepare_dc(graphics, pen);
-
-    retval = draw_polyline(graphics, pen, pt, 2, TRUE);
-
-    restore_dc(graphics, save_state);
-
-    return retval;
+    return GdipDrawLines(graphics, pen, pt, 2);
 }
 
 GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics *graphics, GpPen *pen, INT x1,




More information about the wine-cvs mailing list