gdiplus: Added GdipClonePen.

This commit is contained in:
Evan Stade 2007-07-17 19:30:50 -07:00 committed by Alexandre Julliard
parent 76fe458eb5
commit 628c9a69c1
3 changed files with 24 additions and 1 deletions

View File

@ -51,7 +51,7 @@
@ stub GdipCloneImageAttributes
@ stub GdipCloneMatrix
@ stub GdipClonePath
@ stub GdipClonePen
@ stdcall GdipClonePen(ptr ptr)
@ stub GdipCloneRegion
@ stub GdipCloneStringFormat
@ stdcall GdipClosePathFigure(ptr)

View File

@ -65,6 +65,28 @@ static DWORD gdip_to_gdi_join(GpLineJoin join)
}
}
GpStatus WINGDIPAPI GdipClonePen(GpPen *pen, GpPen **clonepen)
{
LOGBRUSH lb;
if(!pen || !clonepen)
return InvalidParameter;
*clonepen = GdipAlloc(sizeof(GpPen));
if(!*clonepen) return OutOfMemory;
memcpy(*clonepen, pen, sizeof(GpPen));
lb.lbStyle = BS_SOLID;
lb.lbColor = (*clonepen)->color;
lb.lbHatch = 0;
(*clonepen)->gdipen = ExtCreatePen((*clonepen)->style,
roundr((*clonepen)->width), &lb, 0, NULL);
return Ok;
}
GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, FLOAT width, GpUnit unit,
GpPen **pen)
{

View File

@ -27,6 +27,7 @@
extern "C" {
#endif
GpStatus WINGDIPAPI GdipClonePen(GpPen*,GpPen**);
GpStatus WINGDIPAPI GdipCreatePen1(ARGB,REAL,GpUnit,GpPen**);
GpStatus WINGDIPAPI GdipDeletePen(GpPen*);
GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen*,GpDashStyle);