gdiplus: Added GdipCreatePathGradient.
This commit is contained in:
parent
490ca1cabb
commit
b26d7ce82d
@ -48,6 +48,46 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone)
|
|||||||
return Ok;
|
return Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF* points,
|
||||||
|
INT count, GpWrapMode wrap, GpPathGradient **grad)
|
||||||
|
{
|
||||||
|
COLORREF col = ARGB2COLORREF(0xffffffff);
|
||||||
|
|
||||||
|
if(!points || !grad)
|
||||||
|
return InvalidParameter;
|
||||||
|
|
||||||
|
if(count <= 0)
|
||||||
|
return OutOfMemory;
|
||||||
|
|
||||||
|
*grad = GdipAlloc(sizeof(GpPathGradient));
|
||||||
|
if (!*grad) return OutOfMemory;
|
||||||
|
|
||||||
|
(*grad)->pathdata.Count = count;
|
||||||
|
(*grad)->pathdata.Points = GdipAlloc(count * sizeof(PointF));
|
||||||
|
(*grad)->pathdata.Types = GdipAlloc(count);
|
||||||
|
|
||||||
|
if(!(*grad)->pathdata.Points || !(*grad)->pathdata.Types){
|
||||||
|
GdipFree((*grad)->pathdata.Points);
|
||||||
|
GdipFree((*grad)->pathdata.Types);
|
||||||
|
GdipFree(*grad);
|
||||||
|
return OutOfMemory;
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy((*grad)->pathdata.Points, points, count * sizeof(PointF));
|
||||||
|
memset((*grad)->pathdata.Types, PathPointTypeLine, count);
|
||||||
|
|
||||||
|
(*grad)->brush.lb.lbStyle = BS_SOLID;
|
||||||
|
(*grad)->brush.lb.lbColor = col;
|
||||||
|
(*grad)->brush.lb.lbHatch = 0;
|
||||||
|
|
||||||
|
(*grad)->brush.gdibrush = CreateSolidBrush(col);
|
||||||
|
(*grad)->brush.bt = BrushTypePathGradient;
|
||||||
|
(*grad)->centercolor = 0xffffffff;
|
||||||
|
(*grad)->wrap = wrap;
|
||||||
|
|
||||||
|
return Ok;
|
||||||
|
}
|
||||||
|
|
||||||
/* FIXME: path gradient brushes not truly supported (drawn as solid brushes) */
|
/* FIXME: path gradient brushes not truly supported (drawn as solid brushes) */
|
||||||
GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath* path,
|
GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath* path,
|
||||||
GpPathGradient **grad)
|
GpPathGradient **grad)
|
||||||
|
@ -116,7 +116,7 @@
|
|||||||
@ stub GdipCreatePath2
|
@ stub GdipCreatePath2
|
||||||
@ stub GdipCreatePath2I
|
@ stub GdipCreatePath2I
|
||||||
@ stdcall GdipCreatePath(long ptr)
|
@ stdcall GdipCreatePath(long ptr)
|
||||||
@ stub GdipCreatePathGradient
|
@ stdcall GdipCreatePathGradient(ptr long long ptr)
|
||||||
@ stdcall GdipCreatePathGradientFromPath(ptr ptr)
|
@ stdcall GdipCreatePathGradientFromPath(ptr ptr)
|
||||||
@ stub GdipCreatePathGradientI
|
@ stub GdipCreatePathGradientI
|
||||||
@ stdcall GdipCreatePathIter(ptr ptr)
|
@ stdcall GdipCreatePathIter(ptr ptr)
|
||||||
|
@ -88,6 +88,8 @@ GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics*,SmoothingMode);
|
|||||||
GpStatus WINGDIPAPI GdipSetWorldTransform(GpGraphics*,GpMatrix*);
|
GpStatus WINGDIPAPI GdipSetWorldTransform(GpGraphics*,GpMatrix*);
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipCloneBrush(GpBrush*,GpBrush**);
|
GpStatus WINGDIPAPI GdipCloneBrush(GpBrush*,GpBrush**);
|
||||||
|
GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF*,INT,GpWrapMode,
|
||||||
|
GpPathGradient**);
|
||||||
GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath*,
|
GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath*,
|
||||||
GpPathGradient**);
|
GpPathGradient**);
|
||||||
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**);
|
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user