/[paths]/src/egg_link.c
ViewVC logotype

Diff of /src/egg_link.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 67 by ben, Sun Aug 26 14:54:09 2012 UTC revision 68 by ben, Sun Aug 26 17:30:53 2012 UTC
# Line 22  static void egg_link_init(EggLink *link) Line 22  static void egg_link_init(EggLink *link)
22  static gboolean egg_link_draw (GtkWidget *link, cairo_t *cr)  static gboolean egg_link_draw (GtkWidget *link, cairo_t *cr)
23  {  {
24          GtkAllocation a;          GtkAllocation a;
25            gdouble x1, x2, y1, y2;
26            EggLink *l = EGG_LINK(link);
27    
28          gtk_widget_get_allocation (link, &a);          gtk_widget_get_allocation (link, &a);
29    
30          cairo_move_to(cr, 0, 0);          if(l->u->x > l->v->x) {
31                    x1 = a.width - 1;
32                    x2 = 0;
33            } else {
34                    x1 = 0;
35                    x2 = a.width - 1;
36            }
37    
38          cairo_line_to(cr, a.width, a.height);          if(l->u->y > l->v->y) {
39                    y1 = a.height - 1;
40                    y2 = 0;
41            } else {
42                    y1 = 0;
43                    y2 = a.height - 1;
44            }
45    
46            cairo_move_to(cr, x1, y1);
47    
48            cairo_line_to(cr, x2, y2);
49          cairo_stroke(cr);          cairo_stroke(cr);
50    
51          return FALSE;          return FALSE;

Legend:
Removed from v.67  
changed lines
  Added in v.68

  ViewVC Help
Powered by ViewVC 1.1.26