[9/18] gdiplus: added GdipAddPathBezierI

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


Hi,

 dlls/gdiplus/gdiplus.spec   |    2 +-
 dlls/gdiplus/graphics.c     |    2 ++
 dlls/gdiplus/graphicspath.c |   34 ++++++++++++++++++++++++++++++++++
 include/gdiplusflat.h       |    1 +
 4 files changed, 38 insertions(+), 1 deletions(-)

-- 
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index f1e7c03..f0424ac 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -1,7 +1,7 @@
 @ stdcall GdipAddPathArc(ptr long long long long long long)
 @ stub GdipAddPathArcI
 @ stub GdipAddPathBezier
-@ stub GdipAddPathBezierI
+@ stdcall GdipAddPathBezierI(ptr long long long long long long long long)
 @ stdcall GdipAddPathBeziers(ptr ptr long)
 @ stub GdipAddPathBeziersI
 @ stub GdipAddPathClosedCurve2
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 294858a..32c833f 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -1291,6 +1291,8 @@ GpStatus WINGDIPAPI GdipDrawString(GpGra
 
     if(format || (brush->bt != BrushTypeSolidColor)){
         FIXME("not implemented for given parameters\n");
+        if(format)
+            TRACE("format attr is %d\n", format->attr);
         return NotImplemented;
     }
 
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c
index 5cfac5f..399f2f7 100644
--- a/dlls/gdiplus/graphicspath.c
+++ b/dlls/gdiplus/graphicspath.c
@@ -97,6 +97,40 @@ GpStatus WINGDIPAPI GdipAddPathArc(GpPat
     return Ok;
 }
 
+GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2,
+    INT y2, INT x3, INT y3, INT x4, INT y4)
+{
+    INT old_count;
+
+    if(!path)
+        return InvalidParameter;
+
+    if(!lengthen_path(path, 4))
+        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.Points[old_count + 2].X = (REAL) x3;
+    path->pathdata.Points[old_count + 2].Y = (REAL) y3;
+    path->pathdata.Points[old_count + 3].X = (REAL) x4;
+    path->pathdata.Points[old_count + 3].Y = (REAL) y4;
+
+    path->pathdata.Types[old_count] =
+        (path->newfigure ? PathPointTypeStart : PathPointTypeLine);
+    path->pathdata.Types[old_count + 1] = PathPointTypeBezier;
+    path->pathdata.Types[old_count + 2] = PathPointTypeBezier;
+    path->pathdata.Types[old_count + 3] = PathPointTypeBezier;
+
+    path->newfigure = FALSE;
+    path->pathdata.Count += 4;
+
+    return Ok;
+}
+
 GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath *path, GDIPCONST GpPointF *points,
     INT count)
 {
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 6fe0104..1c75813 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -140,6 +140,7 @@ GpStatus WINGDIPAPI GdipSetSolidFillColo
 GpStatus WINGDIPAPI GdipSetTextureTransform(GpTexture *,GDIPCONST GpMatrix*);
 
 GpStatus WINGDIPAPI GdipAddPathArc(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL);
+GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath*,INT,INT,INT,INT,INT,INT,INT,INT);
 GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT);
 GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL);
 GpStatus WINGDIPAPI GdipAddPathLine2(GpPath*,GDIPCONST GpPointF*,INT);
-- 
1.4.1


More information about the wine-patches mailing list