Module: wine Branch: master Commit: e933da4fdb69fd0667d2c9137717c68991ebf172 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e933da4fdb69fd0667d2c91377...
Author: Vincent Povirk vincent@codeweavers.com Date: Thu Feb 11 16:01:14 2010 -0600
gdiplus: Copy hatch brushes using the create function.
The DIB used in the LOGBRUSH doesn't last long enough.
---
dlls/gdiplus/brush.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index 2eca755..0d32c0f 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -60,13 +60,11 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone) break; } case BrushTypeHatchFill: - *clone = GdipAlloc(sizeof(GpHatch)); - if (!*clone) return OutOfMemory; - - memcpy(*clone, brush, sizeof(GpHatch)); + { + GpHatch *hatch = (GpHatch*)brush;
- (*clone)->gdibrush = CreateBrushIndirect(&(*clone)->lb); - break; + return GdipCreateHatchBrush(hatch->hatchstyle, hatch->forecol, hatch->backcol, (GpHatch**)clone); + } case BrushTypePathGradient:{ GpPathGradient *src, *dest; INT count;