gdiplus: Added GdipCreatePath2.

oldstable
Evan Stade 2007-08-08 19:41:56 -07:00 committed by Alexandre Julliard
parent ebadbd4bd5
commit ff2e63d41e
3 changed files with 33 additions and 1 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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);