Commit c022c466 authored by Hugh Bellamy's avatar Hugh Bellamy Committed by Alexandre Julliard

gdiplus: Define GpHatchStyle.

parent e0601829
......@@ -230,7 +230,7 @@ static const char HatchBrushes[][8] = {
{ 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff }, /* HatchStyleDarkHorizontal */
};
GpStatus get_hatch_data(HatchStyle hatchstyle, const char **result)
GpStatus get_hatch_data(GpHatchStyle hatchstyle, const char **result)
{
if (hatchstyle < sizeof(HatchBrushes) / sizeof(HatchBrushes[0]))
{
......@@ -244,7 +244,7 @@ GpStatus get_hatch_data(HatchStyle hatchstyle, const char **result)
/******************************************************************************
* GdipCreateHatchBrush [GDIPLUS.@]
*/
GpStatus WINGDIPAPI GdipCreateHatchBrush(HatchStyle hatchstyle, ARGB forecol, ARGB backcol, GpHatch **brush)
GpStatus WINGDIPAPI GdipCreateHatchBrush(GpHatchStyle hatchstyle, ARGB forecol, ARGB backcol, GpHatch **brush)
{
TRACE("(%d, %d, %d, %p)\n", hatchstyle, forecol, backcol, brush);
......@@ -941,7 +941,7 @@ GpStatus WINGDIPAPI GdipGetHatchForegroundColor(GpHatch *brush, ARGB *forecol)
return Ok;
}
GpStatus WINGDIPAPI GdipGetHatchStyle(GpHatch *brush, HatchStyle *hatchstyle)
GpStatus WINGDIPAPI GdipGetHatchStyle(GpHatch *brush, GpHatchStyle *hatchstyle)
{
TRACE("(%p, %p)\n", brush, hatchstyle);
......
......@@ -139,7 +139,7 @@ extern GpStatus trace_path(GpGraphics *graphics, GpPath *path) DECLSPEC_HIDDEN;
typedef struct region_element region_element;
extern void delete_element(region_element *element) DECLSPEC_HIDDEN;
extern GpStatus get_hatch_data(HatchStyle hatchstyle, const char **result) DECLSPEC_HIDDEN;
extern GpStatus get_hatch_data(GpHatchStyle hatchstyle, const char **result) DECLSPEC_HIDDEN;
static inline INT gdip_round(REAL x)
{
......@@ -276,7 +276,7 @@ struct GpBrush{
struct GpHatch{
GpBrush brush;
HatchStyle hatchstyle;
GpHatchStyle hatchstyle;
ARGB forecol;
ARGB backcol;
};
......
......@@ -1556,6 +1556,27 @@ static void test_pathgradientblend(void)
expect(Ok, status);
}
static void test_getHatchStyle(void)
{
GpStatus status;
GpHatch *brush;
GpHatchStyle hatchStyle;
GdipCreateHatchBrush(HatchStyleHorizontal, 11, 12, &brush);
status = GdipGetHatchStyle(NULL, &hatchStyle);
expect(InvalidParameter, status);
status = GdipGetHatchStyle(brush, NULL);
expect(InvalidParameter, status);
status = GdipGetHatchStyle(brush, &hatchStyle);
expect(Ok, status);
expect(HatchStyleHorizontal, hatchStyle);
GdipDeleteBrush((GpBrush *)brush);
}
START_TEST(brush)
{
struct GdiplusStartupInput gdiplusStartupInput;
......@@ -1606,6 +1627,7 @@ START_TEST(brush)
test_pathgradientcenterpoint();
test_pathgradientpresetblend();
test_pathgradientblend();
test_getHatchStyle();
GdiplusShutdown(gdiplusToken);
DestroyWindow(hwnd);
......
......@@ -387,10 +387,10 @@ GpStatus WINGDIPAPI GdipWarpPath(GpPath*,GpMatrix*,GDIPCONST GpPointF*,INT,REAL,
GpStatus WINGDIPAPI GdipWidenPath(GpPath*,GpPen*,GpMatrix*,REAL);
/* HatchBrush */
GpStatus WINGDIPAPI GdipCreateHatchBrush(HatchStyle,ARGB,ARGB,GpHatch**);
GpStatus WINGDIPAPI GdipCreateHatchBrush(GpHatchStyle,ARGB,ARGB,GpHatch**);
GpStatus WINGDIPAPI GdipGetHatchBackgroundColor(GpHatch*,ARGB*);
GpStatus WINGDIPAPI GdipGetHatchForegroundColor(GpHatch*,ARGB*);
GpStatus WINGDIPAPI GdipGetHatchStyle(GpHatch*,HatchStyle*);
GpStatus WINGDIPAPI GdipGetHatchStyle(GpHatch*,GpHatchStyle*);
/* Image */
GpStatus WINGDIPAPI GdipCloneImage(GpImage*, GpImage**);
......
......@@ -95,5 +95,6 @@ typedef FlushIntention GpFlushIntention;
typedef CoordinateSpace GpCoordinateSpace;
typedef PenAlignment GpPenAlignment;
typedef PenType GpPenType;
typedef HatchStyle GpHatchStyle;
#endif
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