gdiplus/metafile: Support hatch brushes for recording.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Vincent Povirk <vincent@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
905bd23b2e
commit
f25f0fa2ac
|
@ -3752,25 +3752,45 @@ static GpStatus METAFILE_AddPathObject(GpMetafile *metafile, GpPath *path, DWORD
|
||||||
|
|
||||||
static GpStatus METAFILE_PrepareBrushData(GpBrush *brush, DWORD *size)
|
static GpStatus METAFILE_PrepareBrushData(GpBrush *brush, DWORD *size)
|
||||||
{
|
{
|
||||||
if (brush->bt == BrushTypeSolidColor)
|
switch (brush->bt)
|
||||||
{
|
{
|
||||||
*size = FIELD_OFFSET(EmfPlusBrush, BrushData.solid) + sizeof(EmfPlusSolidBrushData);
|
case BrushTypeSolidColor:
|
||||||
return Ok;
|
*size = FIELD_OFFSET(EmfPlusBrush, BrushData) + sizeof(EmfPlusSolidBrushData);
|
||||||
|
break;
|
||||||
|
case BrushTypeHatchFill:
|
||||||
|
*size = FIELD_OFFSET(EmfPlusBrush, BrushData) + sizeof(EmfPlusHatchBrushData);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
FIXME("unsupported brush type: %d\n", brush->bt);
|
||||||
|
return NotImplemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
FIXME("unsupported brush type: %d\n", brush->bt);
|
return Ok;
|
||||||
return NotImplemented;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void METAFILE_FillBrushData(GpBrush *brush, EmfPlusBrush *data)
|
static void METAFILE_FillBrushData(GpBrush *brush, EmfPlusBrush *data)
|
||||||
{
|
{
|
||||||
if (brush->bt == BrushTypeSolidColor)
|
data->Version = VERSION_MAGIC2;
|
||||||
{
|
data->Type = brush->bt;
|
||||||
GpSolidFill *solid = (GpSolidFill*)brush;
|
|
||||||
|
|
||||||
data->Version = VERSION_MAGIC2;
|
switch (brush->bt)
|
||||||
data->Type = solid->brush.bt;
|
{
|
||||||
|
case BrushTypeSolidColor:
|
||||||
|
{
|
||||||
|
GpSolidFill *solid = (GpSolidFill *)brush;
|
||||||
data->BrushData.solid.SolidColor = solid->color;
|
data->BrushData.solid.SolidColor = solid->color;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case BrushTypeHatchFill:
|
||||||
|
{
|
||||||
|
GpHatch *hatch = (GpHatch *)brush;
|
||||||
|
data->BrushData.hatch.HatchStyle = hatch->hatchstyle;
|
||||||
|
data->BrushData.hatch.ForeColor = hatch->forecol;
|
||||||
|
data->BrushData.hatch.BackColor = hatch->backcol;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
FIXME("unsupported brush type: %d\n", brush->bt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue