gdiplus: Added GdipCloneCustomLineCap.

This commit is contained in:
Evan Stade 2007-07-19 18:22:38 -07:00 committed by Alexandre Julliard
parent d07088ee8a
commit 628237f334
3 changed files with 30 additions and 1 deletions

View File

@ -24,6 +24,34 @@
#include "gdiplus.h"
#include "gdiplus_private.h"
GpStatus WINGDIPAPI GdipCloneCustomLineCap(GpCustomLineCap* from,
GpCustomLineCap** to)
{
if(!from || !to)
return InvalidParameter;
*to = GdipAlloc(sizeof(GpCustomLineCap));
if(!*to) return OutOfMemory;
memcpy(*to, from, sizeof(GpCustomLineCap));
(*to)->pathdata.Points = GdipAlloc(from->pathdata.Count * sizeof(PointF));
(*to)->pathdata.Types = GdipAlloc(from->pathdata.Count);
if((!(*to)->pathdata.Types || !(*to)->pathdata.Points) && (*to)->pathdata.Count){
GdipFree((*to)->pathdata.Points);
GdipFree((*to)->pathdata.Types);
GdipFree(*to);
return OutOfMemory;
}
memcpy((*to)->pathdata.Points, from->pathdata.Points, from->pathdata.Count
* sizeof(PointF));
memcpy((*to)->pathdata.Types, from->pathdata.Types, from->pathdata.Count);
return Ok;
}
GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath* fillPath, GpPath* strokePath,
GpLineCap baseCap, REAL baseInset, GpCustomLineCap **customCap)
{

View File

@ -44,7 +44,7 @@
@ stub GdipCloneBitmapArea
@ stub GdipCloneBitmapAreaI
@ stub GdipCloneBrush
@ stub GdipCloneCustomLineCap
@ stdcall GdipCloneCustomLineCap(ptr ptr)
@ stub GdipCloneFont
@ stub GdipCloneFontFamily
@ stub GdipCloneImage

View File

@ -101,6 +101,7 @@ GpStatus WINGDIPAPI GdipPathIterCopyData(GpPathIterator*,INT*,GpPointF*,BYTE*,
GpStatus WINGDIPAPI GdipPathIterNextSubpath(GpPathIterator*,INT*,INT*,INT*,BOOL*);
GpStatus WINGDIPAPI GdipPathIterRewind(GpPathIterator*);
GpStatus WINGDIPAPI GdipCloneCustomLineCap(GpCustomLineCap*,GpCustomLineCap**);
GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath*,GpPath*,GpLineCap,REAL,
GpCustomLineCap**);
GpStatus WINGDIPAPI GdipDeleteCustomLineCap(GpCustomLineCap*);