gdiplus: Added GdipClonePath.
This commit is contained in:
parent
fdf9f8fb05
commit
bba20a68b8
|
@ -55,7 +55,7 @@
|
||||||
@ stub GdipCloneImage
|
@ stub GdipCloneImage
|
||||||
@ stub GdipCloneImageAttributes
|
@ stub GdipCloneImageAttributes
|
||||||
@ stdcall GdipCloneMatrix(ptr ptr)
|
@ stdcall GdipCloneMatrix(ptr ptr)
|
||||||
@ stub GdipClonePath
|
@ stdcall GdipClonePath(ptr ptr)
|
||||||
@ stdcall GdipClonePen(ptr ptr)
|
@ stdcall GdipClonePen(ptr ptr)
|
||||||
@ stub GdipCloneRegion
|
@ stub GdipCloneRegion
|
||||||
@ stub GdipCloneStringFormat
|
@ stub GdipCloneStringFormat
|
||||||
|
|
|
@ -212,6 +212,32 @@ GpStatus WINGDIPAPI GdipAddPathPath(GpPath *path, GDIPCONST GpPath* addingPath,
|
||||||
return Ok;
|
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)
|
GpStatus WINGDIPAPI GdipClosePathFigure(GpPath* path)
|
||||||
{
|
{
|
||||||
if(!path)
|
if(!path)
|
||||||
|
|
|
@ -97,6 +97,7 @@ GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT);
|
||||||
GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL);
|
GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL);
|
||||||
GpStatus WINGDIPAPI GdipAddPathLine2(GpPath*,GDIPCONST GpPointF*,INT);
|
GpStatus WINGDIPAPI GdipAddPathLine2(GpPath*,GDIPCONST GpPointF*,INT);
|
||||||
GpStatus WINGDIPAPI GdipAddPathPath(GpPath*,GDIPCONST GpPath*,BOOL);
|
GpStatus WINGDIPAPI GdipAddPathPath(GpPath*,GDIPCONST GpPath*,BOOL);
|
||||||
|
GpStatus WINGDIPAPI GdipClonePath(GpPath*,GpPath**);
|
||||||
GpStatus WINGDIPAPI GdipClosePathFigure(GpPath*);
|
GpStatus WINGDIPAPI GdipClosePathFigure(GpPath*);
|
||||||
GpStatus WINGDIPAPI GdipClosePathFigures(GpPath*);
|
GpStatus WINGDIPAPI GdipClosePathFigures(GpPath*);
|
||||||
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode,GpPath**);
|
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode,GpPath**);
|
||||||
|
|
Loading…
Reference in New Issue