gdiplus: Copy hatch brushes using the create function.

The DIB used in the LOGBRUSH doesn't last long enough.
This commit is contained in:
Vincent Povirk 2010-02-11 16:01:14 -06:00 committed by Alexandre Julliard
parent 1aa3308fa5
commit e933da4fdb
1 changed files with 4 additions and 6 deletions

View File

@ -60,13 +60,11 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone)
break;
}
case BrushTypeHatchFill:
*clone = GdipAlloc(sizeof(GpHatch));
if (!*clone) return OutOfMemory;
{
GpHatch *hatch = (GpHatch*)brush;
memcpy(*clone, brush, sizeof(GpHatch));
(*clone)->gdibrush = CreateBrushIndirect(&(*clone)->lb);
break;
return GdipCreateHatchBrush(hatch->hatchstyle, hatch->forecol, hatch->backcol, (GpHatch**)clone);
}
case BrushTypePathGradient:{
GpPathGradient *src, *dest;
INT count;