From 06513184b338a2339a0acdff18a4020a01ba7662 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 11 Feb 2010 16:01:14 -0600 Subject: [PATCH 1/4] gdiplus: Copy hatch brushes using the create function. The DIB used in the LOGBRUSH doesn't last long enough. --- dlls/gdiplus/brush.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index 2eca755..90b4c52 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)); - - (*clone)->gdibrush = CreateBrushIndirect(&(*clone)->lb); - break; + { + GpHatch *hatch = (GpHatch*)brush; + + return GdipCreateHatchBrush(hatch->hatchstyle, hatch->forecol, hatch->backcol, (GpHatch**)clone); + } case BrushTypePathGradient:{ GpPathGradient *src, *dest; INT count; -- 1.6.3.3