5 ViewTank::ViewTank(Glib::ustring _name, int orientacion):ViewItem(_name)
9 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/tanque_e.png");
20 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/tanque_o.png");
38 std::string ViewTank::get_extra()
47 bool ViewTank::on_image_expose_event(GdkEventExpose *e)
49 Glib::RefPtr<Gdk::Colormap> colormap = Gtk::Widget::get_default_colormap();
50 colormap->alloc_color(color);
51 gc->set_foreground(color);
52 gc->set_background(color);
53 gc->set_line_attributes(6, Gdk::LINE_SOLID, Gdk::CAP_NOT_LAST, Gdk::JOIN_MITER);
55 w = image.get_width();
56 h = image.get_height();
57 // TODO : hacer que dibuje arcos en el sentido del codo!
58 if (actual_flow == 0) return true;
59 image.get_window()->draw_arc(gc, 1, w/2-7, h/2-7, 14, 14, 0, 360*64);