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(blanco);
33 colormap->alloc_color(color);
34 gc->set_foreground(blanco);
35 gc->set_background(blanco);
36 gc->set_line_attributes(6, Gdk::LINE_SOLID, Gdk::CAP_NOT_LAST, Gdk::JOIN_MITER);
38 w = image.get_width();
39 h = image.get_height();
40 // TODO : hacer que dibuje arcos en el sentido del codo!
43 image.get_window()->draw_arc(gc, 0, -16, 16, w, h, 0, 90*64);
44 gc->set_line_attributes(4, Gdk::LINE_SOLID, Gdk::CAP_NOT_LAST, Gdk::JOIN_MITER);
45 gc->set_foreground(color);
46 image.get_window()->draw_arc(gc, 0, -16, 16, w, h, 0, 90*64);
49 image.get_window()->draw_arc(gc, 0, -16, -16, w, h, 0*64, -90*64);
50 gc->set_line_attributes(4, Gdk::LINE_SOLID, Gdk::CAP_NOT_LAST, Gdk::JOIN_MITER);
51 gc->set_foreground(color);
52 image.get_window()->draw_arc(gc, 0, -16, -16, w, h, 0*64, -90*64);
55 image.get_window()->draw_arc(gc, 0, 16, -16, w, h, -90*64, -90*64);
56 gc->set_line_attributes(4, Gdk::LINE_SOLID, Gdk::CAP_NOT_LAST, Gdk::JOIN_MITER);
57 gc->set_foreground(color);
58 image.get_window()->draw_arc(gc, 0, 16, -16, w, h, -90*64, -90*64);
61 image.get_window()->draw_arc(gc, 0, 16, 16, w, h, 90*64, 90*64);
62 gc->set_line_attributes(4, Gdk::LINE_SOLID, Gdk::CAP_NOT_LAST, Gdk::JOIN_MITER);
63 gc->set_foreground(color);
64 image.get_window()->draw_arc(gc, 0, 16, 16, w, h, 90*64, 90*64);