From 90d57b132f868d67c9ee83a53568a4da032c417c Mon Sep 17 00:00:00 2001 From: mattias Date: Sun, 20 Sep 2009 22:18:46 +0000 Subject: [PATCH] gtk intf: TGtkWidgetSet.CreateBrushIndirect: gdk_pixbuf_render_pixmap_and_mask creates the pixmap and mask itself git-svn-id: trunk@21790 - --- lcl/interfaces/gtk/gtkwinapi.inc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lcl/interfaces/gtk/gtkwinapi.inc b/lcl/interfaces/gtk/gtkwinapi.inc index 7e3c70d126..97614e33bb 100644 --- a/lcl/interfaces/gtk/gtkwinapi.inc +++ b/lcl/interfaces/gtk/gtkwinapi.inc @@ -969,7 +969,6 @@ const var GObject: PGdiObject; TmpMask: PGdkBitmap; - W, H: Integer; begin Assert(False, Format('Trace:> [TGtkWidgetSet.CreateBrushIndirect] Style: %d, Color: %8x', [LogBrush.lbStyle, LogBrush.lbColor])); @@ -1046,11 +1045,10 @@ begin end; gbPixbuf: begin - W := gdk_pixbuf_get_width(PGdiObject(lbHatch)^.GDIPixbufObject); - H := gdk_pixbuf_get_height(PGdiObject(lbHatch)^.GDIPixbufObject); - GObject^.GDIBrushPixmap := gdk_pixmap_new(nil, W, H, 24); - TmpMask := gdk_pixmap_new(nil, W, H, 1); - gdk_pixbuf_render_pixmap_and_mask(PGdiObject(lbHatch)^.GDIPixbufObject, GObject^.GDIBrushPixmap, TmpMask, $80); + GObject^.GDIBrushPixmap := nil; + TmpMask := nil; + gdk_pixbuf_render_pixmap_and_mask(PGdiObject(lbHatch)^.GDIPixbufObject, + GObject^.GDIBrushPixmap, TmpMask, $80); gdk_pixmap_unref(TmpMask); end; else