]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Client/src/item_drain.cpp
Se arreglan un par de huevadas y ahora se ve 10 puntos el exclusa_inteligente.xml
[z.facultad/75.42/plaqui.git] / Client / src / item_drain.cpp
index aa3b3255f58794560addb4cb468bc12e71d3ec7d..80136ba8a5856a84359f36a951912f07ec9545cd 100644 (file)
@@ -6,16 +6,16 @@ ViewDrain::ViewDrain(Glib::ustring _name, int orientacion):ViewItem(_name)
 {
        switch (orientacion) {
                case 0:
-                       image.set("drain_n.png");
+                       image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/drain_n.png");
                break;
                case 1:
-                       image.set("drain_e.png");
+                       image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/drain_e.png");
                break;
                case 2:
-                       image.set("drain_s.png");
+                       image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/drain_s.png");
                break;
                case 3:
-                       image.set("drain_o.png");
+                       image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/drain_o.png");
        }
        image.show();
        set_size_request();
@@ -25,3 +25,18 @@ ViewDrain::~ViewDrain()
 {
 }
 
+bool ViewDrain::on_image_expose_event(GdkEventExpose *e)
+{
+       Glib::RefPtr<Gdk::Colormap> colormap = Gtk::Widget::get_default_colormap();
+       colormap->alloc_color(color);
+       gc->set_foreground(color);
+       gc->set_background(color);
+       gc->set_line_attributes(6, Gdk::LINE_SOLID, Gdk::CAP_NOT_LAST, Gdk::JOIN_MITER);
+       int w,h;
+       w = image.get_width();
+       h = image.get_height();
+       // TODO : hacer que dibuje arcos en el sentido del codo!
+       if (actual_flow == 0) return true;
+       image.get_window()->draw_arc(gc, 1, 8, 8, 16, 16, 0, 360*64);
+       return true;
+}