2 #include "item_drain.h"
5 ViewDrain::ViewDrain(Glib::ustring _name, int orientacion):ViewItem(_name)
9 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/drain_n.png");
12 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/drain_e.png");
15 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/drain_s.png");
18 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/drain_o.png");
24 ViewDrain::~ViewDrain()
28 bool ViewDrain::on_image_expose_event(GdkEventExpose *e)
30 Glib::RefPtr<Gdk::Colormap> colormap = Gtk::Widget::get_default_colormap();
31 colormap->alloc_color(color);
32 gc->set_foreground(color);
33 gc->set_background(color);
34 gc->set_line_attributes(6, Gdk::LINE_SOLID, Gdk::CAP_NOT_LAST, Gdk::JOIN_MITER);
36 w = image.get_width();
37 h = image.get_height();
38 // TODO : hacer que dibuje arcos en el sentido del codo!
39 if (actual_flow == 0) return true;
40 image.get_window()->draw_arc(gc, 1, 8, 8, 16, 16, 0, 360*64);