From 08784f371762133fb57a6329926345899856d3cb Mon Sep 17 00:00:00 2001 From: Evan Stade Date: Fri, 6 Jul 2007 16:14:38 -0700 Subject: [PATCH] gdiplus: Added GdipGetPathPoints. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphicspath.c | 13 +++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index ef2a7db9f99..d0ce8d9fe80 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -327,7 +327,7 @@ @ stub GdipGetPathGradientTransform @ stub GdipGetPathGradientWrapMode @ stub GdipGetPathLastPoint -@ stub GdipGetPathPoints +@ stdcall GdipGetPathPoints(ptr ptr long) @ stub GdipGetPathPointsI @ stub GdipGetPathTypes @ stub GdipGetPathWorldBounds diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index bc64f3975e5..6f52d472981 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -144,6 +144,19 @@ GpStatus WINGDIPAPI GdipDeletePath(GpPath *path) return Ok; } +GpStatus WINGDIPAPI GdipGetPathPoints(GpPath *path, GpPointF* points, INT count) +{ + if(!path) + return InvalidParameter; + + if(count < path->pathdata.Count) + return InsufficientBuffer; + + memcpy(points, path->pathdata.Points, path->pathdata.Count); + + return Ok; +} + GpStatus WINGDIPAPI GdipGetPointCount(GpPath *path, INT *count) { if(!path) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index e92c803e0e1..0d38be9c55d 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -53,6 +53,7 @@ GpStatus WINGDIPAPI GdipClosePathFigure(GpPath*); GpStatus WINGDIPAPI GdipClosePathFigures(GpPath*); GpStatus WINGDIPAPI GdipCreatePath(GpFillMode,GpPath**); GpStatus WINGDIPAPI GdipDeletePath(GpPath*); +GpStatus WINGDIPAPI GdipGetPathPoints(GpPath*,GpPointF*,INT); GpStatus WINGDIPAPI GdipGetPointCount(GpPath*,INT*); #ifdef __cplusplus