4 ViewCodo::ViewCodo(Glib::ustring _name, int orientacion):ViewItem(_name)
8 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/codo_o.png");
11 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/codo_n.png");
14 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/codo_e.png");
17 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/codo_s.png");
28 bool ViewCodo::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;
42 image.get_window()->draw_arc(gc, 0, -16, 16, w, h, 0, 90*64);
43 image.get_window()->draw_line(gc, 0, 16, 16, 16);
44 image.get_window()->draw_line(gc, 64-16, 64-16, 64-16, 64);
47 image.get_window()->draw_arc(gc, 0, -16, -16, w, h, 0*64, -90*64);
48 image.get_window()->draw_line(gc, 64-16, 0, 64-16, 16);
49 image.get_window()->draw_line(gc, 0, 64-16, 16, 64-16);
52 image.get_window()->draw_arc(gc, 0, 16, -16, w, h, -90*64, -90*64);
53 image.get_window()->draw_line(gc, 16, 0, 16, 16);
54 image.get_window()->draw_line(gc, 64-16, 64-16, 64, 64-16);
57 image.get_window()->draw_arc(gc, 0, 16, 16, w, h, 90*64, 90*64);
58 image.get_window()->draw_line(gc, 16, 64-16, 16, 64);
59 image.get_window()->draw_line(gc, 64-16, 16, 64, 16);