From 1f1ecfb2b51bb0cab790c9c83cd8cbd8fb20d013 Mon Sep 17 00:00:00 2001 From: Evan Stade Date: Wed, 11 Jul 2007 18:08:05 -0700 Subject: [PATCH] gdiplus: Added GdipTransformPath. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphicspath.c | 12 ++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 5879360f590..c1d6725b3dc 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -584,7 +584,7 @@ @ stub GdipTestControl @ stdcall GdipTransformMatrixPoints(ptr ptr long) @ stub GdipTransformMatrixPointsI -@ stub GdipTransformPath +@ stdcall GdipTransformPath(ptr ptr) @ stub GdipTransformPoints @ stub GdipTransformPointsI @ stub GdipTransformRegion diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 394b9f63b37..4665fca44d7 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -222,3 +222,15 @@ GpStatus WINGDIPAPI GdipStartPathFigure(GpPath *path) return Ok; } + +GpStatus WINGDIPAPI GdipTransformPath(GpPath *path, GpMatrix *matrix) +{ + if(!path) + return InvalidParameter; + + if(path->pathdata.Count == 0) + return Ok; + + return GdipTransformMatrixPoints(matrix, (GpPointF*) path->pathdata.Points, + path->pathdata.Count); +} diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 9185fd5fbaf..95dafde1b3d 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -59,6 +59,7 @@ GpStatus WINGDIPAPI GdipGetPathPoints(GpPath*,GpPointF*,INT); GpStatus WINGDIPAPI GdipGetPathTypes(GpPath*,BYTE*,INT); GpStatus WINGDIPAPI GdipGetPointCount(GpPath*,INT*); GpStatus WINGDIPAPI GdipStartPathFigure(GpPath*); +GpStatus WINGDIPAPI GdipTransformPath(GpPath*,GpMatrix*); GpStatus WINGDIPAPI GdipCreateMatrix2(REAL,REAL,REAL,REAL,REAL,REAL,GpMatrix**); GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix*);