gtk intf: TGtkWidgetSet.CreateBitmap: gdk_pixbuf_render_pixmap_and_mask creates the pixmap and mask itself

git-svn-id: trunk@21791 -
This commit is contained in:
mattias 2009-09-20 22:26:59 +00:00
parent 90d57b132f
commit a564288864

View File

@ -844,7 +844,18 @@ var
gdk_pixbuf_loader_close(Loader {$ifdef gtk2},nil {$endif});
end;
gdk_pixbuf_render_pixmap_and_mask(Src, GdiObject^.GDIPixmapObject.Image, GdiObject^.GDIPixmapObject.Mask, $80);
if GdiObject^.GDIPixmapObject.Image<>nil then
begin
gdk_pixmap_unref(GdiObject^.GDIPixmapObject.Image);
GdiObject^.GDIPixmapObject.Image:=nil;
end;
if GdiObject^.GDIPixmapObject.Mask<>nil then
begin
gdk_bitmap_unref(GdiObject^.GDIPixmapObject.Mask);
GdiObject^.GDIPixmapObject.Mask:=nil;
end;
gdk_pixbuf_render_pixmap_and_mask(Src,
GdiObject^.GDIPixmapObject.Image, GdiObject^.GDIPixmapObject.Mask, $80);
gdk_pixbuf_unref(Src);
GdiObject^.Depth := gdk_drawable_get_depth(GdiObject^.GDIPixmapObject.Image);