Commit 6d0ca495 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus/metafile: Support hatch brushes in playback.

parent 0625b338
......@@ -230,12 +230,20 @@ typedef struct EmfPlusSolidBrushData
EmfPlusARGB SolidColor;
} EmfPlusSolidBrushData;
typedef struct EmfPlusHatchBrushData
{
DWORD HatchStyle;
EmfPlusARGB ForeColor;
EmfPlusARGB BackColor;
} EmfPlusHatchBrushData;
typedef struct EmfPlusBrush
{
DWORD Version;
DWORD Type;
union {
EmfPlusSolidBrushData solid;
EmfPlusHatchBrushData hatch;
} BrushData;
} EmfPlusBrush;
......@@ -1833,6 +1841,13 @@ static GpStatus metafile_deserialize_brush(const BYTE *record_data, UINT data_si
status = GdipCreateSolidFill(data->BrushData.solid.SolidColor, (GpSolidFill **)brush);
break;
case BrushTypeHatchFill:
if (data_size != header_size + sizeof(EmfPlusHatchBrushData))
return InvalidParameter;
status = GdipCreateHatchBrush(data->BrushData.hatch.HatchStyle, data->BrushData.hatch.ForeColor,
data->BrushData.hatch.BackColor, (GpHatch **)brush);
break;
default:
FIXME("brush type %u is not supported.\n", data->Type);
return NotImplemented;
......
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