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

gdiplus: Added GdipCreatePath2.

parent ebadbd4b
......@@ -113,7 +113,7 @@
@ stub GdipCreateMetafileFromStream
@ stdcall GdipCreateMetafileFromWmf(ptr long ptr ptr)
@ stub GdipCreateMetafileFromWmfFile
@ stub GdipCreatePath2
@ stdcall GdipCreatePath2(ptr ptr long long ptr)
@ stub GdipCreatePath2I
@ stdcall GdipCreatePath(long ptr)
@ stdcall GdipCreatePathGradient(ptr long long ptr)
......
......@@ -282,6 +282,36 @@ GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
return Ok;
}
GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF* points,
GDIPCONST BYTE* types, INT count, GpFillMode fill, GpPath **path)
{
if(!path)
return InvalidParameter;
*path = GdipAlloc(sizeof(GpPath));
if(!*path) return OutOfMemory;
(*path)->pathdata.Points = GdipAlloc(count * sizeof(PointF));
(*path)->pathdata.Types = GdipAlloc(count);
if(!(*path)->pathdata.Points || !(*path)->pathdata.Types){
GdipFree((*path)->pathdata.Points);
GdipFree((*path)->pathdata.Types);
GdipFree(*path);
return OutOfMemory;
}
memcpy((*path)->pathdata.Points, points, count * sizeof(PointF));
memcpy((*path)->pathdata.Types, types, count);
(*path)->pathdata.Count = count;
(*path)->datalen = count;
(*path)->fill = fill;
(*path)->newfigure = TRUE;
return Ok;
}
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
{
if(!path)
......
......@@ -130,6 +130,8 @@ GpStatus WINGDIPAPI GdipClonePath(GpPath*,GpPath**);
GpStatus WINGDIPAPI GdipClosePathFigure(GpPath*);
GpStatus WINGDIPAPI GdipClosePathFigures(GpPath*);
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode,GpPath**);
GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF*,GDIPCONST BYTE*,INT,
GpFillMode,GpPath**);
GpStatus WINGDIPAPI GdipDeletePath(GpPath*);
GpStatus WINGDIPAPI GdipFillPolygon(GpGraphics*,GpBrush*,GDIPCONST GpPointF*,
INT,GpFillMode);
......
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