[11/18] gdiplus: added GdipAddPathLineI

Evan Stade estade at gmail.com
Tue Aug 14 21:00:21 CDT 2007


Hi,

 dlls/gdiplus/gdiplus.spec   |    2 +-
 dlls/gdiplus/graphicspath.c |   27 +++++++++++++++++++++++++++
 include/gdiplusflat.h       |    1 +
 3 files changed, 29 insertions(+), 1 deletions(-)

-- 
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 42591dc..71a6b26 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -19,7 +19,7 @@
 @ stdcall GdipAddPathLine2(ptr ptr long)
 @ stub GdipAddPathLine2I
 @ stub GdipAddPathLine
-@ stub GdipAddPathLineI
+@ stdcall GdipAddPathLineI(ptr long long long long)
 @ stdcall GdipAddPathPath(ptr ptr long)
 @ stub GdipAddPathPie
 @ stub GdipAddPathPieI
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c
index 399f2f7..ed71400 100644
--- a/dlls/gdiplus/graphicspath.c
+++ b/dlls/gdiplus/graphicspath.c
@@ -217,6 +217,33 @@ GpStatus WINGDIPAPI GdipAddPathLine2(GpP
     return Ok;
 }
 
+GpStatus WINGDIPAPI GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y2)
+{
+    INT old_count;
+
+    if(!path)
+        return InvalidParameter;
+
+    if(!lengthen_path(path, 2))
+        return OutOfMemory;
+
+    old_count = path->pathdata.Count;
+
+    path->pathdata.Points[old_count].X = (REAL) x1;
+    path->pathdata.Points[old_count].Y = (REAL) y1;
+    path->pathdata.Points[old_count + 1].X = (REAL) x2;
+    path->pathdata.Points[old_count + 1].Y = (REAL) y2;
+
+    path->pathdata.Types[old_count] =
+        (path->newfigure ? PathPointTypeStart : PathPointTypeLine);
+    path->pathdata.Types[old_count + 1] = PathPointTypeLine;
+
+    path->newfigure = FALSE;
+    path->pathdata.Count += 2;
+
+    return Ok;
+}
+
 GpStatus WINGDIPAPI GdipAddPathPath(GpPath *path, GDIPCONST GpPath* addingPath,
     BOOL connect)
 {
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index d24d744..8b325a6 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -146,6 +146,7 @@ GpStatus WINGDIPAPI GdipAddPathBezierI(G
 GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT);
 GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL);
 GpStatus WINGDIPAPI GdipAddPathLine2(GpPath*,GDIPCONST GpPointF*,INT);
+GpStatus WINGDIPAPI GdipAddPathLineI(GpPath*,INT,INT,INT,INT);
 GpStatus WINGDIPAPI GdipAddPathPath(GpPath*,GDIPCONST GpPath*,BOOL);
 GpStatus WINGDIPAPI GdipClonePath(GpPath*,GpPath**);
 GpStatus WINGDIPAPI GdipClosePathFigure(GpPath*);
-- 
1.4.1


More information about the wine-patches mailing list