Index: gschem/include/prototype.h
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/include/prototype.h,v
retrieving revision 1.132
diff -u -3 -r1.132 prototype.h
--- gschem/include/prototype.h	24 Jul 2006 03:29:21 -0000	1.132
+++ gschem/include/prototype.h	30 Jul 2006 10:15:07 -0000
@@ -609,6 +618,7 @@
 /* o_line.c */
 void o_line_draw(TOPLEVEL *w_current, OBJECT *o_current);
 void o_line_draw_solid(GdkWindow *w, GdkGC *gc, GdkColor *color, GdkCapStyle cap, gint x1, gint y1, gint x2, gint y2, gint line_width, gint length, gint space);
+void o_line_draw_solid_cairo(GdkWindow *w, GdkGC *gc, GdkColor *color, GdkCapStyle cap, double x1, double y1, double x2, double y2, gint line_width, gint length, gint space);
 void o_line_draw_dotted(GdkWindow *w, GdkGC *gc, GdkColor *color, GdkCapStyle cap, gint x1, gint y1, gint x2, gint y2, gint line_width, gint length, gint space);
 void o_line_draw_dashed(GdkWindow *w, GdkGC *gc, GdkColor *color, GdkCapStyle cap, gint x1, gint y1, gint x2, gint y2, gint line_width, gint length, gint space);
 void o_line_draw_center(GdkWindow *w, GdkGC *gc, GdkColor *color, GdkCapStyle cap, gint x1, gint y1, gint x2, gint y2, gint line_width, gint length, gint space);
Index: gschem/src/o_line.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_line.c,v
retrieving revision 1.20
diff -u -3 -r1.20 o_line.c
--- gschem/src/o_line.c	14 Jul 2006 02:23:55 -0000	1.20
+++ gschem/src/o_line.c	30 Jul 2006 10:15:08 -0000
@@ -127,7 +127,7 @@
     case TYPE_SOLID:
       length = -1;
       space = -1;
-      draw_func = (void *) o_line_draw_solid;
+      draw_func = (void *) o_line_draw_solid_cairo;
       break;
 			
     case TYPE_DOTTED:
@@ -163,10 +163,17 @@
   if((length == 0) || (space == 0))
   draw_func = (void *) o_line_draw_solid;
 
-  (*draw_func)(w_current->window, w_current->gc, color, line_end,
-               x1, y1, x2, y2, line_width, length, space);
-  (*draw_func)(w_current->backingstore, w_current->gc, color, line_end,
-               x1, y1, x2, y2, line_width, length, space);
+  if(draw_func==o_line_draw_solid_cairo) {
+	  (*draw_func)(w_current->window, w_current->gc, color, line_end,
+	               o_current->line->cairo_x[0], o_current->line->cairo_y[0], o_current->line->cairo_x[1], o_current->line->cairo_y[1], line_width, length, space);
+	  (*draw_func)(w_current->backingstore, w_current->gc, color, line_end,
+	               o_current->line->cairo_x[0], o_current->line->cairo_y[0], o_current->line->cairo_x[1], o_current->line->cairo_y[1], line_width, length, space);
+  } else {
+	  (*draw_func)(w_current->window, w_current->gc, color, line_end,
+	               x1, y1, x2, y2, line_width, length, space);
+	  (*draw_func)(w_current->backingstore, w_current->gc, color, line_end,
+	               x1, y1, x2, y2, line_width, length, space);
+  }
 
   /* reset line width and reset back to default */
   gdk_gc_set_line_attributes(w_current->gc, 0, GDK_LINE_SOLID,
@@ -211,8 +218,26 @@
  *  \param [in] length      (unused).
  *  \param [in] space       (unused).
  */
+void o_line_draw_solid_cairo(GdkWindow *w, GdkGC *gc, GdkColor *color,
+		       GdkCapStyle cap, double x1, double y1, double x2, double y2,
+		       gint line_width, gint length, gint space)
+{
+	cairo_t *cr;
+
+	cr=gdk_cairo_create(w);
+
+	gdk_cairo_set_source_color(cr, color);
+
+	cairo_move_to(cr, x1+0.5, y1+0.5);
+	cairo_line_to(cr, x2+0.5, y2+0.5);
+	cairo_set_line_width(cr, line_width);
+	cairo_stroke(cr);
+
+	cairo_destroy(cr);
+}
+
 void o_line_draw_solid(GdkWindow *w, GdkGC *gc, GdkColor *color,
		       GdkCapStyle cap, gint x1, gint y1, gint x2, gint y2,
 		       gint line_width, gint length, gint space)
 {
   gdk_gc_set_foreground(gc, color);
Index: libgeda/include/prototype.h
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/include/prototype.h,v
retrieving revision 1.103
diff -u -3 -r1.103 prototype.h
--- libgeda/include/prototype.h	16 Jun 2006 12:08:49 -0000	1.103
+++ libgeda/include/prototype.h	30 Jul 2006 10:15:09 -0000
@@ -96,6 +96,7 @@
 int pix_x(TOPLEVEL *w_current, int val);
 int pix_y(TOPLEVEL *w_current, int val);
 void WORLDtoSCREEN(TOPLEVEL *w_current, int x, int y, int *mil_x, int *mil_y);
+void WORLDtoSCREENd(TOPLEVEL *w_current, int x, int y, double *px, double *py);
 void SCREENtoWORLD(TOPLEVEL *w_current, int mx, int my, int *x, int *y);
 int snap_grid(TOPLEVEL *w_current, int input);
 int SCREENabs(TOPLEVEL *w_current, int val);
Index: libgeda/include/struct.h
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/include/struct.h,v
retrieving revision 1.85
diff -u -3 -r1.85 struct.h
--- libgeda/include/struct.h	24 Jul 2006 03:29:21 -0000	1.85
+++ libgeda/include/struct.h	30 Jul 2006 10:15:09 -0000
@@ -76,6 +76,9 @@
 
   int screen_x[2];
   int screen_y[2];
+
+  double cairo_x[2];
+  double cairo_y[2];
 };
 
 /* pb20011014 - name the grips */
Index: libgeda/src/m_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/m_basic.c,v
retrieving revision 1.12
diff -u -3 -r1.12 m_basic.c
--- libgeda/src/m_basic.c	5 Jul 2006 03:13:38 -0000	1.12
+++ libgeda/src/m_basic.c	30 Jul 2006 10:15:09 -0000
@@ -196,6 +196,40 @@
   return(j);
 }
 
+/*! \brief Convert a y coordinate to pixels.
+ *
+ *  \param [in] w_current  The TOPLEVEL object
+ *  \param [in] val        The y coordinate to convert
+ *  \return The coordinate value in pixels.
+ */
+double pixd_y(TOPLEVEL *w_current, int val)
+{
+  double i;
+
+  i = w_current->height - (
+                           w_current->page_current->to_screen_y_constant * 
+                           (double)(val - w_current->page_current->top)); 
+
+  return(i);
+}
+
+/*! \brief Convert a x coordinate to pixels.
+ *
+ *  \param [in] w_current  The TOPLEVEL object
+ *  \param [in] val        The x coordinate to convert
+ *  \return The coordinate value in pixels.
+ */
+double pixd_x(TOPLEVEL *w_current, int val)
+{
+
+  double i;
+
+  i = w_current->page_current->to_screen_x_constant * 
+  (double)(val - w_current->page_current->left);
+
+  return(i);
+}
+
 /*! \brief Transform WORLD coordinates to SCREEN coordinates
  *  \par Function Description
  *  This function takes in WORLD x/y coordinates and
@@ -216,6 +250,23 @@
   *mil_y = pix_y(w_current, y);
 }
 
+/*! \brief Transform WORLD coordinates to SCREEN coordinates
+ *  \par Function Description
+ *  This function takes in WORLD x/y coordinates and
+ *  transforms them to SCREEN x/y coordinates.
+ *
+ *  \param [in]  w_current  The TOPLEVEL object.
+ *  \param [in]  x          The x coordinate in WORLD units.
+ *  \param [in]  y          The y coordinate in WORLD units.
+ *  \param [out] px         The x coordinate in SCREEN units.
+ *  \param [out] py         The y coordinate in SCREEN units.
+ */
+void WORLDtoSCREENd(TOPLEVEL *w_current, int x, int y, double *px, double *py)
+{
+  *px = pixd_x(w_current, x);
+  *py = pixd_y(w_current, y);
+}
+
 /*! \brief Transform WORLD coordinates to WORLD coordinates
  *  \par Function Description
  *  This function takes in SCREEN x/y coordinates and
Index: libgeda/src/o_line_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_line_basic.c,v
retrieving revision 1.23
diff -u -3 -r1.23 o_line_basic.c
--- libgeda/src/o_line_basic.c	15 Jul 2006 17:00:51 -0000	1.23
+++ libgeda/src/o_line_basic.c	30 Jul 2006 10:15:09 -0000
@@ -654,12 +654,28 @@
   int screen_x1, screen_y1;
   int screen_x2, screen_y2;
   int left, right, top, bottom;
+  double cairo_x1, cairo_y1;
+  double cairo_x2, cairo_y2;
 
   if (o_current->line == NULL) {
     return;
   }
 
   /* update the screen coords of end 1 of the line */
+  WORLDtoSCREENd(w_current,
+		o_current->line->x[0], o_current->line->y[0], 
+		&cairo_x1, &cairo_y1);  
+  o_current->line->cairo_x[0] = cairo_x1;
+  o_current->line->cairo_y[0] = cairo_y1;
+
+  /* update the screen coords of end 2 of the line */
+  WORLDtoSCREENd(w_current,
+		o_current->line->x[1], o_current->line->y[1], 
+		&cairo_x2, &cairo_y2);  
+  o_current->line->cairo_x[1] = cairo_x2;
+  o_current->line->cairo_y[1] = cairo_y2;
+
+  /* update the screen coords of end 1 of the line */
   WORLDtoSCREEN(w_current,
 		o_current->line->x[0], o_current->line->y[0], 
 		&screen_x1, &screen_y1);  
