Commit bba20a68 authored by Evan Stade's avatar Evan Stade Committed by Alexandre Julliard

gdiplus: Added GdipClonePath.

parent fdf9f8fb
......@@ -55,7 +55,7 @@
@ stub GdipCloneImage
@ stub GdipCloneImageAttributes
@ stdcall GdipCloneMatrix(ptr ptr)
@ stub GdipClonePath
@ stdcall GdipClonePath(ptr ptr)
@ stdcall GdipClonePen(ptr ptr)
@ stub GdipCloneRegion
@ stub GdipCloneStringFormat
......
......@@ -212,6 +212,32 @@ GpStatus WINGDIPAPI GdipAddPathPath(GpPath *path, GDIPCONST GpPath* addingPath,
return Ok;
}
GpStatus WINGDIPAPI GdipClonePath(GpPath* path, GpPath **clone)
{
if(!path || !clone)
return InvalidParameter;
*clone = GdipAlloc(sizeof(GpPath));
if(!*clone) return OutOfMemory;
memcpy(*clone, path, sizeof(GpPath));
(*clone)->pathdata.Points = GdipAlloc(path->datalen * sizeof(PointF));
(*clone)->pathdata.Types = GdipAlloc(path->datalen);
if(!(*clone)->pathdata.Points || !(*clone)->pathdata.Types){
GdipFree(*clone);
GdipFree((*clone)->pathdata.Points);
GdipFree((*clone)->pathdata.Types);
return OutOfMemory;
}
memcpy((*clone)->pathdata.Points, path->pathdata.Points,
path->datalen * sizeof(PointF));
memcpy((*clone)->pathdata.Types, path->pathdata.Types, path->datalen);
return Ok;
}
GpStatus WINGDIPAPI GdipClosePathFigure(GpPath* path)
{
if(!path)
......
......@@ -97,6 +97,7 @@ GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT);
GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL);
GpStatus WINGDIPAPI GdipAddPathLine2(GpPath*,GDIPCONST GpPointF*,INT);
GpStatus WINGDIPAPI GdipAddPathPath(GpPath*,GDIPCONST GpPath*,BOOL);
GpStatus WINGDIPAPI GdipClonePath(GpPath*,GpPath**);
GpStatus WINGDIPAPI GdipClosePathFigure(GpPath*);
GpStatus WINGDIPAPI GdipClosePathFigures(GpPath*);
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode,GpPath**);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment