I want to set the alpha transparency of an image with this code, but
it does nothing.
Could anyone tell me the correct way to do it?


bool on_expose_event(GdkEventExpose* ev)
        {
                img_->add_alpha(false, 0, 0, 0);
                img_->composite(img_, 0, 0, img_->get_width(), 
img_->get_height()
                                                        , 0, 0, 1, 1, 
Gdk::INTERP_BILINEAR, 10);
                img_->render_to_drawable(get_window(), 
get_style()->get_black_gc(),
                0, 0, 100, 80, img_->get_width(), img_->get_height(), // draw 
the
whole image (from 0,0 to the full width,height) at 100,80 in the
window
                Gdk::RGB_DITHER_NONE, 0, 0);
                return true;
        }

 img_ is a Glib::RefPtr<Gdk::Pixbuf>.

Thanks in advance.
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to