bool ViewPump::on_image_expose_event(GdkEventExpose *e)
{
- Glib::RefPtr<Gdk::Colormap> colormap = image.get_colormap();
- colormap->alloc_color(color);
+ Glib::RefPtr<Gdk::Colormap> colormap = Gtk::Widget::get_default_colormap();
+ if (!colormap->alloc_color(color, true, true)) {
+ std::cout << name << ": Error alocando color!" << std::endl;
+ }
+
gc->set_foreground(color);
gc->set_background(color);
gc->set_line_attributes(6, Gdk::LINE_SOLID, Gdk::CAP_NOT_LAST, Gdk::JOIN_MITER);