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 = image.get_colormap();
31 Gdk::Color blanco = Gdk::Color("white");
32 colormap->alloc_color(color);
33 gc->set_foreground(color);
34 gc->set_background(color);
35 gc->set_line_attributes(6, Gdk::LINE_SOLID, Gdk::CAP_NOT_LAST, Gdk::JOIN_MITER);
37 w = image.get_width();
38 h = image.get_height();
39 // TODO : hacer que dibuje arcos en el sentido del codo!
40 if (actual_flow == 0) return true;
43 image.get_window()->draw_arc(gc, 0, -16, 16, w, h, 0, 90*64);
44 image.get_window()->draw_line(gc, 0, 16, 16, 16);
45 image.get_window()->draw_line(gc, 64-16, 64-16, 64-16, 64);
48 image.get_window()->draw_arc(gc, 0, -16, -16, w, h, 0*64, -90*64);
49 image.get_window()->draw_line(gc, 64-16, 0, 64-16, 16);
50 image.get_window()->draw_line(gc, 0, 64-16, 16, 64-16);
53 image.get_window()->draw_arc(gc, 0, 16, -16, w, h, -90*64, -90*64);
54 image.get_window()->draw_line(gc, 16, 0, 16, 16);
55 image.get_window()->draw_line(gc, 64-16, 64-16, 64, 64-16);
58 image.get_window()->draw_arc(gc, 0, 16, 16, w, h, 90*64, 90*64);
59 image.get_window()->draw_line(gc, 16, 64-16, 16, 64);
60 image.get_window()->draw_line(gc, 64-16, 16, 64, 16);