From: Stefan S. <ma...@ss...> - 2015-09-25 23:31:39
|
On Fri, 2015-09-25 at 23:01 +0200, Stefan Salewski wrote: > No idea why currently. The pixbuf.fill should cause no harm, maybe > set_cell_data_func is wrong? Gdk::Pixbuf.new direct before cell.pixbuf.fill! seems to help. I am not really sure, tested only for a few minutes yet. cell.pixbuf = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB, true, 8, 10, 10) # (colorspace, has_alpha, bits_per_sample, width, height) cell.pixbuf.fill!((iter[Col_R] * 255).round * 16777216 + (iter[Col_G] * 255).round * 65536 + (iter[Col_B] * 255).round * 256 + (iter[Col_A] * 255).round) Before that, I tried to use cairo instead of pixbuf.fill like s = Cairo::ImageSurface.new(Cairo::FORMAT_A1, 3, 3) cr = Cairo::Context.new(s) pixbuf = Gdk::Pixbuf.from_surface Gdk::Pixbuf.from_surface() method seems to be not available? |