Commit 2b438a02 authored by Evan Stade's avatar Evan Stade Committed by Alexandre Julliard

gdiplus: Added GdipCreateLineBrush.

parent 3f9fad16
......@@ -77,6 +77,35 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone)
return Ok;
}
GpStatus WINGDIPAPI GdipCreateLineBrush(GDIPCONST GpPointF* startpoint,
GDIPCONST GpPointF* endpoint, ARGB startcolor, ARGB endcolor,
GpWrapMode wrap, GpLineGradient **line)
{
COLORREF col = ARGB2COLORREF(startcolor);
if(!line || !startpoint || !endpoint)
return InvalidParameter;
*line = GdipAlloc(sizeof(GpLineGradient));
if(!*line) return OutOfMemory;
(*line)->brush.lb.lbStyle = BS_SOLID;
(*line)->brush.lb.lbColor = col;
(*line)->brush.lb.lbHatch = 0;
(*line)->brush.gdibrush = CreateSolidBrush(col);
(*line)->brush.bt = BrushTypeLinearGradient;
(*line)->startpoint.X = startpoint->X;
(*line)->startpoint.Y = startpoint->Y;
(*line)->endpoint.X = endpoint->X;
(*line)->endpoint.Y = endpoint->Y;
(*line)->startcolor = startcolor;
(*line)->endcolor = endcolor;
(*line)->wrap = wrap;
return Ok;
}
GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF* points,
INT count, GpWrapMode wrap, GpPathGradient **grad)
{
......
......@@ -98,7 +98,7 @@
@ stub GdipCreateHalftonePalette
@ stub GdipCreateHatchBrush
@ stdcall GdipCreateImageAttributes(ptr)
@ stub GdipCreateLineBrush
@ stdcall GdipCreateLineBrush(ptr ptr long long long ptr)
@ stub GdipCreateLineBrushFromRect
@ stub GdipCreateLineBrushFromRectI
@ stub GdipCreateLineBrushFromRectWithAngle
......
......@@ -104,6 +104,15 @@ struct GpPathGradient{
GpPointF focus;
};
struct GpLineGradient{
GpBrush brush;
GpPointF startpoint;
GpPointF endpoint;
ARGB startcolor;
ARGB endcolor;
GpWrapMode wrap;
};
struct GpPath{
GpFillMode fill;
GpPathData pathdata;
......
......@@ -49,6 +49,8 @@ GpStatus WINGDIPAPI GdipSetPenWidth(GpPen*,REAL);
GpStatus WINGDIPAPI GdipCreateFromHDC(HDC,GpGraphics**);
GpStatus WINGDIPAPI GdipCreateFromHWND(HWND,GpGraphics**);
GpStatus WINGDIPAPI GdipCreateLineBrush(GDIPCONST GpPointF*,GDIPCONST GpPointF*,
ARGB,ARGB,GpWrapMode,GpLineGradient**);
GpStatus WINGDIPAPI GdipCreateMetafileFromEmf(HENHMETAFILE,BOOL,GpMetafile**);
GpStatus WINGDIPAPI GdipCreateMetafileFromWmf(HMETAFILE,BOOL,
GDIPCONST WmfPlaceableFileHeader*,GpMetafile**);
......
......@@ -34,6 +34,7 @@ class GpMetafile : public GpImage {};
class GpImageAttributes {};
class GpBitmap : public GpImage {};
class GpPathGradient : public GpBrush {};
class GpLineGradient : public GpBrush {};
#else /* end of c++ declarations */
......@@ -50,6 +51,7 @@ typedef struct GpMetafile GpMetafile;
typedef struct GpImageAttributes GpImageAttributes;
typedef struct GpBitmap GpBitmap;
typedef struct GpPathGradient GpPathGradient;
typedef struct GpLineGradient GpLineGradient;
#endif /* end of c declarations */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment