[16/19] gdiplus: updated brush cloner/deleter

Evan Stade estade at gmail.com
Tue Aug 7 20:42:56 CDT 2007


Hi,

changelog:
*update GdipCloneBrush to handle brushes of type BrushTypeLinearGradient
*update GdipDeleteBrush to handle brushes of type BrushTypeLinearGradient

 dlls/gdiplus/brush.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

-- 
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index b855031..dca3a41 100644
--- a/dlls/gdiplus/brush.c
+++ b/dlls/gdiplus/brush.c
@@ -70,6 +70,14 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBru
 
             break;
         }
+        case BrushTypeLinearGradient:
+            *clone = GdipAlloc(sizeof(GpLineGradient));
+            if(!*clone)    return OutOfMemory;
+
+            memcpy(*clone, brush, sizeof(GpLineGradient));
+
+            (*clone)->gdibrush = CreateSolidBrush((*clone)->lb.lbColor);
+            break;
         default:
             return NotImplemented;
     }
@@ -237,6 +245,7 @@ GpStatus WINGDIPAPI GdipDeleteBrush(GpBr
             GdipFree(((GpPathGradient*) brush)->pathdata.Types);
             break;
         case BrushTypeSolidColor:
+        case BrushTypeLinearGradient:
         default:
             break;
     }
-- 
1.4.1


More information about the wine-patches mailing list