[GDI+ implementation: 1/8] GdipDrawLineI

Evan Stade estade at gmail.com
Tue Jun 12 12:44:31 CDT 2007


Hi,

Changelog:
*implemented GdipDrawLineI

 dlls/gdiplus/gdiplus.spec |    2 +-
 dlls/gdiplus/graphics.c   |   16 ++++++++++++++++
 2 files changed, 17 insertions(+), 1 deletions(-)

-Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index b725b9e..f19a26d 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -175,7 +175,7 @@
 @ stub GdipDrawImageRectRect
 @ stub GdipDrawImageRectRectI
 @ stub GdipDrawLine
-@ stub GdipDrawLineI
+@ stdcall GdipDrawLineI(ptr ptr long long long long)
 @ stub GdipDrawLines
 @ stub GdipDrawLinesI
 @ stub GdipDrawPath
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 76ca99e..642fde2 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -65,3 +65,19 @@ GpStatus WINGDIPAPI GdipDeleteGraphics(G
 
     return Ok;
 }
+
+GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics *graphics, GpPen *pen, INT x1, 
+    INT y1, INT x2, INT y2)
+{
+    HGDIOBJ old_obj;
+
+    if(!pen || !graphics)
+        return InvalidParameter;
+
+    old_obj = SelectObject(graphics->hdc, pen->gdipen);
+    MoveToEx(graphics->hdc, x1, y1, NULL);
+    LineTo(graphics->hdc, x2, y2);
+    SelectObject(graphics->hdc, old_obj);
+
+    return Ok;
+}
-- 
1.4.1


More information about the wine-patches mailing list