CItem::CItem(const char *filename):Gtk::DrawingArea()
{
- std::cout << "CItem::CItem() -> Usando " << filename << std::endl;
image = Gdk::Pixbuf::create_from_file(filename);
- std::cout << "CItem::CItem() -> w = " << image->get_width() << " h = " << image->get_height() << std::endl;
set_size_request(image->get_width(), image->get_height());
}
bool CItem::on_expose_event(GdkEventExpose* event)
{
- image->render_to_drawable(get_window(), get_style()->get_black_gc(), \
- 0, 0, 0, 0, image->get_width(), image->get_height(), Gdk::RGB_DITHER_NONE, 0, 0);
+ image->render_to_drawable(get_window(), get_style()->get_black_gc(),
+ 0, 0, 0, 0, image->get_width(),
+ image->get_height(), Gdk::RGB_DITHER_NONE, 0, 0);
- Gtk::DrawingArea::on_expose_event(event);
+ // XXX Esto no deberia ser necesario! en todo caso devolves false en
+ // vez de true para que siga llamando a los otros handlers :)
+ //Gtk::DrawingArea::on_expose_event(event);
return true;
}