gdiplus: Added solid-color path gradient brush implementation.
This commit is contained in:
parent
5e29e37af5
commit
f18cdef727
|
@ -23,6 +23,9 @@
|
|||
|
||||
#include "gdiplus.h"
|
||||
#include "gdiplus_private.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(gdiplus);
|
||||
|
||||
GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone)
|
||||
{
|
||||
|
@ -45,6 +48,29 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone)
|
|||
return Ok;
|
||||
}
|
||||
|
||||
/* FIXME: path gradient brushes not truly supported (drawn as solid brushes) */
|
||||
GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath* path,
|
||||
GpPathGradient **grad)
|
||||
{
|
||||
COLORREF col = ARGB2COLORREF(0xffffffff);
|
||||
|
||||
if(!path || !grad)
|
||||
return InvalidParameter;
|
||||
|
||||
*grad = GdipAlloc(sizeof(GpPathGradient));
|
||||
if (!*grad) return OutOfMemory;
|
||||
|
||||
(*grad)->brush.lb.lbStyle = BS_SOLID;
|
||||
(*grad)->brush.lb.lbColor = col;
|
||||
(*grad)->brush.lb.lbHatch = 0;
|
||||
|
||||
(*grad)->brush.gdibrush = CreateSolidBrush(col);
|
||||
(*grad)->brush.bt = BrushTypeSolidColor;
|
||||
(*grad)->centercolor = 0xffffffff;
|
||||
|
||||
return Ok;
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB color, GpSolidFill **sf)
|
||||
{
|
||||
COLORREF col = ARGB2COLORREF(color);
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
@ stub GdipCreatePath2I
|
||||
@ stdcall GdipCreatePath(long ptr)
|
||||
@ stub GdipCreatePathGradient
|
||||
@ stub GdipCreatePathGradientFromPath
|
||||
@ stdcall GdipCreatePathGradientFromPath(ptr ptr)
|
||||
@ stub GdipCreatePathGradientI
|
||||
@ stdcall GdipCreatePathIter(ptr ptr)
|
||||
@ stdcall GdipCreatePen1(long long long ptr)
|
||||
|
|
|
@ -92,6 +92,11 @@ struct GpSolidFill{
|
|||
ARGB color;
|
||||
};
|
||||
|
||||
struct GpPathGradient{
|
||||
GpBrush brush;
|
||||
ARGB centercolor;
|
||||
};
|
||||
|
||||
struct GpPath{
|
||||
GpFillMode fill;
|
||||
GpPathData pathdata;
|
||||
|
|
|
@ -88,6 +88,8 @@ GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics*,SmoothingMode);
|
|||
GpStatus WINGDIPAPI GdipSetWorldTransform(GpGraphics*,GpMatrix*);
|
||||
|
||||
GpStatus WINGDIPAPI GdipCloneBrush(GpBrush*,GpBrush**);
|
||||
GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath*,
|
||||
GpPathGradient**);
|
||||
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**);
|
||||
GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*);
|
||||
GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush*);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
class GpGraphics {};
|
||||
class GpGraphics {};
|
||||
class GpBrush {};
|
||||
class GpSolidFill {};
|
||||
class GpSolidFill : public GpBrush {};
|
||||
class GpPath {};
|
||||
class GpMatrix {};
|
||||
class GpPathIterator {};
|
||||
|
@ -33,6 +33,7 @@ class GpImage {};
|
|||
class GpMetafile : public GpImage {};
|
||||
class GpImageAttributes {};
|
||||
class GpBitmap : public GpImage {};
|
||||
class GpPathGradient : public GpBrush {};
|
||||
|
||||
#else /* end of c++ declarations */
|
||||
|
||||
|
@ -48,6 +49,7 @@ typedef struct GpImage GpImage;
|
|||
typedef struct GpMetafile GpMetafile;
|
||||
typedef struct GpImageAttributes GpImageAttributes;
|
||||
typedef struct GpBitmap GpBitmap;
|
||||
typedef struct GpPathGradient GpPathGradient;
|
||||
|
||||
#endif /* end of c declarations */
|
||||
|
||||
|
|
Loading…
Reference in New Issue