X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/e7bc59fe98396b7c67024911b03bf1e08728df3e..dfabbe2822ffdfb241105cff491b4331096e4af3:/Client/src/item_union.cpp?ds=sidebyside diff --git a/Client/src/item_union.cpp b/Client/src/item_union.cpp index 4bfd2ff..eee974e 100644 --- a/Client/src/item_union.cpp +++ b/Client/src/item_union.cpp @@ -28,10 +28,16 @@ ViewUnion::~ViewUnion() bool ViewUnion::on_image_expose_event(GdkEventExpose *e) { - Glib::RefPtr colormap = image.get_colormap(); - colormap->alloc_color(color); + Glib::RefPtr 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();