]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Client/src/item_union.cpp
* Los colores ya estan completamente arreglados
[z.facultad/75.42/plaqui.git] / Client / src / item_union.cpp
index 4bfd2ff73b2106cbbbfa83fb2dbe42ebfd82edb5..eee974e2aa8110c4f4c4ec5c8a114725d09901e1 100644 (file)
@@ -28,10 +28,16 @@ ViewUnion::~ViewUnion()
 
 bool ViewUnion::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, false, false)) {
+               std::cout << "ERROR ALOCANDO COLOR!" << std::endl;
+       }
        gc->set_foreground(color);
        gc->set_background(color);
+       
+       if (name == "union6") {
+               std::cout << color.get_red() << " " << color.get_green() << " " << color.get_blue() << std::endl;
+       }
        int w,h;
        w = image.get_width();
        h = image.get_height();