X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/9350f4883b2e1eb780bd3a30c801fe9eaaaf5f4f..9075115540d133ca048025e719884121007b9e87:/Client/src/item_drain.cpp diff --git a/Client/src/item_drain.cpp b/Client/src/item_drain.cpp index aa3b325..80136ba 100644 --- a/Client/src/item_drain.cpp +++ b/Client/src/item_drain.cpp @@ -6,16 +6,16 @@ ViewDrain::ViewDrain(Glib::ustring _name, int orientacion):ViewItem(_name) { switch (orientacion) { case 0: - image.set("drain_n.png"); + image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/drain_n.png"); break; case 1: - image.set("drain_e.png"); + image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/drain_e.png"); break; case 2: - image.set("drain_s.png"); + image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/drain_s.png"); break; case 3: - image.set("drain_o.png"); + image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/drain_o.png"); } image.show(); set_size_request(); @@ -25,3 +25,18 @@ ViewDrain::~ViewDrain() { } +bool ViewDrain::on_image_expose_event(GdkEventExpose *e) +{ + Glib::RefPtr colormap = Gtk::Widget::get_default_colormap(); + colormap->alloc_color(color); + gc->set_foreground(color); + gc->set_background(color); + gc->set_line_attributes(6, Gdk::LINE_SOLID, Gdk::CAP_NOT_LAST, Gdk::JOIN_MITER); + int w,h; + w = image.get_width(); + h = image.get_height(); + // TODO : hacer que dibuje arcos en el sentido del codo! + if (actual_flow == 0) return true; + image.get_window()->draw_arc(gc, 1, 8, 8, 16, 16, 0, 360*64); + return true; +}