[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.5.1-20081221-74-g2324874)



The branch, master has been updated
       via  2324874f08009f431d174865d305f04736adc4eb (commit)
      from  93450371d4557f94570863be3a283c7862ab01d6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gschem/include/gschem_struct.h |    3 --
 gschem/src/a_zoom.c            |    4 +-
 gschem/src/gschem_toplevel.c   |    3 --
 gschem/src/o_arc.c             |   23 +++++++-----------
 gschem/src/o_box.c             |   21 ++++++----------
 gschem/src/o_bus.c             |   38 +++++++++++++++----------------
 gschem/src/o_circle.c          |   17 +++++--------
 gschem/src/o_grips.c           |    3 --
 gschem/src/o_line.c            |   41 +++++++++-------------------------
 gschem/src/o_net.c             |   40 +++++++++++++++-----------------
 gschem/src/o_path.c            |   41 ++++++++++++---------------------
 gschem/src/o_picture.c         |   28 ++++++++---------------
 gschem/src/o_pin.c             |   40 ++++++++++++++++----------------
 gschem/src/o_place.c           |   24 ++++++++-----------
 gschem/src/o_select.c          |    4 +-
 gschem/src/o_text.c            |    5 +--
 gschem/src/x_color.c           |   12 ----------
 gschem/src/x_window.c          |   48 ----------------------------------------
 18 files changed, 133 insertions(+), 262 deletions(-)


=================
 Commit Messages
=================

commit 2324874f08009f431d174865d305f04736adc4eb
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Dec 29 00:09:37 2008 +0000

    gschem: Change _rubber, _place and _stretch drawing routines to not XOR
    
    Since we're using the invalidate/expose model now, there is no
    need that these functions must use XOR drawing to the screen.
    
    Just painting the desired image should be faster than XOR (which may
    require a read-back of video ram contents).
    
    Also remove the XOR against the background colour when processing
    "outline" colours in x_colour_allocate(). (Since we're no longer
    using those colours with XOR operations).

:100644 100644 bfe378e... ebe58b8... M	gschem/include/gschem_struct.h
:100644 100644 497910c... b94a5ec... M	gschem/src/a_zoom.c
:100644 100644 65cef47... caafcd1... M	gschem/src/gschem_toplevel.c
:100644 100644 2edb35f... 01b1c7a... M	gschem/src/o_arc.c
:100644 100644 2d8e542... 3108aaa... M	gschem/src/o_box.c
:100644 100644 07c3e54... 0e8a5c0... M	gschem/src/o_bus.c
:100644 100644 f544ffe... a049155... M	gschem/src/o_circle.c
:100644 100644 23de0d9... 253dbb3... M	gschem/src/o_grips.c
:100644 100644 de3faee... a3a7c8b... M	gschem/src/o_line.c
:100644 100644 bdd7031... 483247a... M	gschem/src/o_net.c
:100644 100644 fe30178... b29958d... M	gschem/src/o_path.c
:100644 100644 54b4dff... 3dd7033... M	gschem/src/o_picture.c
:100644 100644 a1183ce... 2845cdc... M	gschem/src/o_pin.c
:100644 100644 76ba9f9... 370c770... M	gschem/src/o_place.c
:100644 100644 fe43580... feb8ae4... M	gschem/src/o_select.c
:100644 100644 d507aba... e5cf68d... M	gschem/src/o_text.c
:100644 100644 ca444db... fed211c... M	gschem/src/x_color.c
:100644 100644 ae5cfff... a2a2ed9... M	gschem/src/x_window.c

=========
 Changes
=========

commit 2324874f08009f431d174865d305f04736adc4eb
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Dec 29 00:09:37 2008 +0000

    gschem: Change _rubber, _place and _stretch drawing routines to not XOR
    
    Since we're using the invalidate/expose model now, there is no
    need that these functions must use XOR drawing to the screen.
    
    Just painting the desired image should be faster than XOR (which may
    require a read-back of video ram contents).
    
    Also remove the XOR against the background colour when processing
    "outline" colours in x_colour_allocate(). (Since we're no longer
    using those colours with XOR operations).

diff --git a/gschem/include/gschem_struct.h b/gschem/include/gschem_struct.h
index bfe378e..ebe58b8 100644
--- a/gschem/include/gschem_struct.h
+++ b/gschem/include/gschem_struct.h
@@ -72,9 +72,6 @@ struct st_gschem_toplevel {
   /* graphics context */
   /* ---------------- */
   GdkGC *gc;
-  GdkGC *xor_gc;
-  GdkGC *outline_xor_gc;
-  GdkGC *bounding_xor_gc;
 
   /* ---------------- */
   /* Drawing surfaces */
diff --git a/gschem/src/a_zoom.c b/gschem/src/a_zoom.c
index 497910c..b94a5ec 100644
--- a/gschem/src/a_zoom.c
+++ b/gschem/src/a_zoom.c
@@ -313,8 +313,8 @@ void a_zoom_box_draw_rubber (GSCHEM_TOPLEVEL *w_current)
   box_left   = min(x1, x2);
   box_top    = min(y1, y2);
 
-  gdk_gc_set_foreground (w_current->xor_gc, x_get_darkcolor (ZOOM_BOX_COLOR));
-  gdk_draw_rectangle (w_current->drawable, w_current->xor_gc, FALSE,
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (ZOOM_BOX_COLOR));
+  gdk_draw_rectangle (w_current->drawable, w_current->gc, FALSE,
                       box_left, box_top, box_width, box_height);
 }
 
diff --git a/gschem/src/gschem_toplevel.c b/gschem/src/gschem_toplevel.c
index 65cef47..caafcd1 100644
--- a/gschem/src/gschem_toplevel.c
+++ b/gschem/src/gschem_toplevel.c
@@ -90,9 +90,6 @@ GSCHEM_TOPLEVEL *gschem_toplevel_new ()
   /* graphics context stuff */
   /* ---------------------- */
   w_current->gc              = NULL;
-  w_current->xor_gc          = NULL;
-  w_current->outline_xor_gc  = NULL;
-  w_current->bounding_xor_gc = NULL;
 
   /* ---------------- */
   /* Drawing surfaces */
diff --git a/gschem/src/o_arc.c b/gschem/src/o_arc.c
index 2edb35f..01b1c7a 100644
--- a/gschem/src/o_arc.c
+++ b/gschem/src/o_arc.c
@@ -154,8 +154,7 @@ void o_arc_invalidate_rubber (GSCHEM_TOPLEVEL *w_current)
 /*! \brief Draw an arc described by OBJECT with translation
  *  \par Function Description
  *  This function draws the arc object described by <B>*o_current</B>
- *  translated by the vector (<B>dx</B>,<B>dy</B>) with an xor-function over
- *  the current sheet.
+ *  translated by the vector (<B>dx</B>,<B>dy</B>).
  *  The translation vector is in screen unit.
  *
  *  The arc is displayed with the color of the object.
@@ -202,10 +201,9 @@ void o_arc_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_cur
     color = o_current->color;
   }
 
-  gdk_gc_set_foreground(w_current->outline_xor_gc,
-			x_get_darkcolor(color));
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (color));
   /* better to set the line attributes here ? */
-  gdk_draw_arc (w_current->drawable, w_current->outline_xor_gc, FALSE,
+  gdk_draw_arc (w_current->drawable, w_current->gc, FALSE,
                 x, y, width, height,
                 start_angle * 64, end_angle * 64);
 
@@ -409,9 +407,6 @@ void o_arc_motion (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y, int whichone)
  *  and the start and end angle are given by <B>w_current->second_wx</B> and
  *  <B>w_current->second_wy</B>.
  *
- *  The arc is drawn with a xor function over the current sheet with the
- *  selection color.
- *
  *  \param [in] w_current  The GSCHEM_TOPLEVEL object.
  */
 void o_arc_draw_rubber (GSCHEM_TOPLEVEL *w_current)
@@ -424,13 +419,13 @@ void o_arc_draw_rubber (GSCHEM_TOPLEVEL *w_current)
   WORLDtoSCREEN(toplevel, w_current->first_wx, w_current->first_wy, &cx, &cy);
   radius = SCREENabs(toplevel, w_current->distance);
   
-  gdk_gc_set_foreground (w_current->xor_gc, x_get_darkcolor (SELECT_COLOR));
-  gdk_gc_set_line_attributes(w_current->xor_gc, 0, 
-			     GDK_LINE_SOLID, GDK_CAP_NOT_LAST, 
-			     GDK_JOIN_MITER);
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (SELECT_COLOR));
+  gdk_gc_set_line_attributes (w_current->gc, 0,
+                              GDK_LINE_SOLID, GDK_CAP_NOT_LAST,
+                              GDK_JOIN_MITER);
 
   /* draw the arc from the w_current variables */
-  gdk_draw_arc (w_current->drawable, w_current->xor_gc, FALSE,
+  gdk_draw_arc (w_current->drawable, w_current->gc, FALSE,
                 cx - radius, cy - radius,
                 radius * 2, radius * 2,
                 w_current->second_wx * 64,
@@ -440,7 +435,7 @@ void o_arc_draw_rubber (GSCHEM_TOPLEVEL *w_current)
   rad_angle = ((double) w_current->second_wx) * M_PI / 180;
   x1 = cx + radius*cos(rad_angle);
   y1 = cy - radius*sin(rad_angle);
-  gdk_draw_line (w_current->drawable, w_current->xor_gc, cx, cy, x1, y1);
+  gdk_draw_line (w_current->drawable, w_current->gc, cx, cy, x1, y1);
 }
 
 /*! \brief Draw grip marks on arc.
diff --git a/gschem/src/o_box.c b/gschem/src/o_box.c
index 2d8e542..3108aaa 100644
--- a/gschem/src/o_box.c
+++ b/gschem/src/o_box.c
@@ -406,7 +406,7 @@ void o_box_invalidate_rubber (GSCHEM_TOPLEVEL *w_current)
 /*! \brief Draw a box described by OBJECT with translation
  *  \par Function Description
  *  This function daws the box object described by <B>*o_current</B> translated
- *  by the vector (<B>dx</B>,<B>dy</B>) with an xor-function over the current sheet.
+ *  by the vector (<B>dx</B>,<B>dy</B>).
  *  The translation vector is in world unit.
  *
  *  The box is displayed with the color of the object.
@@ -438,10 +438,9 @@ void o_box_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_cur
     color = o_current->color;
   }
 
-  gdk_gc_set_foreground(w_current->outline_xor_gc,
-                        x_get_darkcolor(color));
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (color));
   gdk_draw_rectangle (w_current->drawable,
-                      w_current->outline_xor_gc, FALSE,
+                      w_current->gc, FALSE,
                       screen_x1,
                       screen_y1,
                       abs(screen_x2 - screen_x1),
@@ -556,7 +555,6 @@ void o_box_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
  *
  *  The old values are inside the <B>w_current</B> pointed structure. Old width,
  *  height and left and top values are recomputed by the corresponding macros.
- *  The box is then erased by performing a xor-drawing over the box.
  *
  *  \param [in] w_current  The GSCHEM_TOPLEVEL object.
  *  \param [in] w_x        Current x coordinate of pointer in world units.
@@ -594,9 +592,6 @@ void o_box_motion (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
  *  <B>w_current->first_wy</B>) and the second corner is at
  *  (<B>w_current->second_wx</B>,<B>w_current->second_wy</B>.
  *
- *  The box is drawn with a xor-function over the current sheet with the
- *  selection color.
- *
  *  \param [in] w_current  The GSCHEM_TOPLEVEL object.
  */
 void o_box_draw_rubber (GSCHEM_TOPLEVEL *w_current)
@@ -617,11 +612,11 @@ void o_box_draw_rubber (GSCHEM_TOPLEVEL *w_current)
   box_top    = min(y1, y2);
   
   /* draw the box from the previous variables */
-  gdk_gc_set_foreground (w_current->xor_gc, x_get_darkcolor (SELECT_COLOR));
-  gdk_gc_set_line_attributes(w_current->xor_gc, 0, 
-			     GDK_LINE_SOLID, GDK_CAP_NOT_LAST, 
-			     GDK_JOIN_MITER);
-  gdk_draw_rectangle (w_current->drawable, w_current->xor_gc,
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (SELECT_COLOR));
+  gdk_gc_set_line_attributes (w_current->gc, 0,
+                              GDK_LINE_SOLID, GDK_CAP_NOT_LAST,
+                              GDK_JOIN_MITER);
+  gdk_draw_rectangle (w_current->drawable, w_current->gc,
                       FALSE, box_left, box_top, box_width, box_height);
 }
 
diff --git a/gschem/src/o_bus.c b/gschem/src/o_bus.c
index 07c3e54..0e8a5c0 100644
--- a/gschem/src/o_bus.c
+++ b/gschem/src/o_bus.c
@@ -109,30 +109,29 @@ void o_bus_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_cur
     color = o_current->color;
   }
 
-  gdk_gc_set_foreground(w_current->outline_xor_gc,
-			x_get_darkcolor(color));
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (color));
 
   if (toplevel->bus_style == THICK ) {
     size = SCREENabs(toplevel, BUS_WIDTH);
-    gdk_gc_set_line_attributes(w_current->outline_xor_gc, size+1,
-                               GDK_LINE_SOLID,
-                               GDK_CAP_NOT_LAST,
-                               GDK_JOIN_MITER);
+    gdk_gc_set_line_attributes (w_current->gc, size+1,
+                                GDK_LINE_SOLID,
+                                GDK_CAP_NOT_LAST,
+                                GDK_JOIN_MITER);
   }
 
   WORLDtoSCREEN(toplevel, o_current->line->x[0] + dx, o_current->line->y[0] + dy, &sx[0], &sy[0] );
   WORLDtoSCREEN(toplevel, o_current->line->x[1] + dx, o_current->line->y[1] + dy, &sx[1], &sy[1] );
 
-  gdk_draw_line (w_current->drawable, w_current->outline_xor_gc,
+  gdk_draw_line (w_current->drawable, w_current->gc,
                  sx[0], sy[0], sx[1], sy[1]);
 
   /* backing store ? not approriate here */
 
   if (toplevel->bus_style == THICK ) {
-    gdk_gc_set_line_attributes(w_current->outline_xor_gc, 0,
-                               GDK_LINE_SOLID,
-                               GDK_CAP_NOT_LAST,
-                               GDK_JOIN_MITER);
+    gdk_gc_set_line_attributes (w_current->gc, 0,
+                                GDK_LINE_SOLID,
+                                GDK_CAP_NOT_LAST,
+                                GDK_JOIN_MITER);
   }
 }
 
@@ -159,8 +158,7 @@ void o_bus_draw_stretch (GSCHEM_TOPLEVEL *w_current,
     color = o_current->color;
   }
 
-  gdk_gc_set_foreground(w_current->outline_xor_gc,
-			x_get_darkcolor(color));
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (color));
 
   if (whichone == 0) {
     dx1 = dx;
@@ -179,7 +177,7 @@ void o_bus_draw_stretch (GSCHEM_TOPLEVEL *w_current,
   WORLDtoSCREEN(toplevel, o_current->line->x[0] + dx1, o_current->line->y[0] + dy1, &sx[0], &sy[0]);
   WORLDtoSCREEN(toplevel, o_current->line->x[1] + dx2, o_current->line->y[1] + dy2, &sx[1], &sy[1]);
 
-  gdk_draw_line (w_current->drawable, w_current->outline_xor_gc,
+  gdk_draw_line (w_current->drawable, w_current->gc,
                  sx[0], sy[0], sx[1], sy[1]);
 }
 
@@ -330,9 +328,9 @@ void o_bus_invalidate_rubber (GSCHEM_TOPLEVEL *w_current)
   o_invalidate_rect (w_current, min_x, min_y, max_x, max_y);
 }
 
-/*! \brief draw a rubberbus segment in XOR mode
+/*! \brief draw a rubberbus segment
  *  \par Function Description
- *  This function draws a bus segment in XOR mode from the point
+ *  This function draws a bus segment from the point
  *  (<B>first_wx</B>,<B>first_wy</B>) to the point 
  *  (<B>second_wx</B>,<B>second_wy</B>) from the <B>GSCHEM_TOPLEVEL</B>
  *   structure.
@@ -355,17 +353,17 @@ void o_bus_draw_rubber (GSCHEM_TOPLEVEL *w_current)
     if (size < 0)
       size=0;
 
-    gdk_gc_set_line_attributes(w_current->xor_gc, size,
+    gdk_gc_set_line_attributes(w_current->gc, size,
                                GDK_LINE_SOLID,
                                GDK_CAP_NOT_LAST,
                                GDK_JOIN_MITER);
   }
 
-  gdk_gc_set_foreground (w_current->xor_gc, x_get_darkcolor (SELECT_COLOR));
-  gdk_draw_line (w_current->drawable, w_current->xor_gc, x1, y1, x2, y2);
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (SELECT_COLOR));
+  gdk_draw_line (w_current->drawable, w_current->gc, x1, y1, x2, y2);
 
   if (toplevel->bus_style == THICK ) {
-    gdk_gc_set_line_attributes(w_current->xor_gc, 0,
+    gdk_gc_set_line_attributes(w_current->gc, 0,
                                GDK_LINE_SOLID,
                                GDK_CAP_NOT_LAST,
                                GDK_JOIN_MITER);
diff --git a/gschem/src/o_circle.c b/gschem/src/o_circle.c
index f544ffe..a049155 100644
--- a/gschem/src/o_circle.c
+++ b/gschem/src/o_circle.c
@@ -404,8 +404,7 @@ void o_circle_invalidate_rubber (GSCHEM_TOPLEVEL *w_current)
 /*! \brief Draw a circle described by OBJECT with translation
  *  \par Function Description
  *  This function draws the circle object described by <B>*o_current</B>
- *  translated by the vector (<B>dx</B>,<B>dy</B>) with an xor-function over
- *  the current sheet.
+ *  translated by the vector (<B>dx</B>,<B>dy</B>).
  *  The translation vector is in world unit.
  *
  *  The circle is displayed with the color of the object.
@@ -444,9 +443,8 @@ void o_circle_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_
                  &x, &y );
 
   /* To draw be sure to setup width height */
-  gdk_gc_set_foreground(w_current->outline_xor_gc,
-                        x_get_darkcolor(color));
-  gdk_draw_arc (w_current->drawable, w_current->outline_xor_gc,
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (color));
+  gdk_draw_arc (w_current->drawable, w_current->gc,
                 FALSE,
                 x, y,
                 2 * radius, 2 * radius,
@@ -586,8 +584,7 @@ void o_circle_motion (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
  *  <B>w_current->first_wy</B>) and its radius is in <B>w_current->distance</B>.
  *
  *  It draws a horizontal radius segment on the right half of the circle and
- *  the circle with the selection color and an xor-function over the current
- *  sheet..
+ *  the circle with the selection color.
  *
  *  \param [in] w_current  The GSCHEM_TOPLEVEL object.
  */
@@ -600,10 +597,10 @@ void o_circle_draw_rubber (GSCHEM_TOPLEVEL *w_current)
   radius = SCREENabs(toplevel, w_current->distance);
 
   /* draw the circle from the w_current variables */
-  gdk_gc_set_foreground (w_current->xor_gc, x_get_darkcolor (SELECT_COLOR));
-  gdk_draw_line (w_current->drawable, w_current->xor_gc,
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (SELECT_COLOR));
+  gdk_draw_line (w_current->drawable, w_current->gc,
                  cx, cy, cx + radius, cy);
-  gdk_draw_arc (w_current->drawable, w_current->xor_gc, FALSE,
+  gdk_draw_arc (w_current->drawable, w_current->gc, FALSE,
                 cx - radius, cy - radius, 2 * radius, 2* radius,
                 0, FULL_CIRCLE);
 }
diff --git a/gschem/src/o_grips.c b/gschem/src/o_grips.c
index 23de0d9..253dbb3 100644
--- a/gschem/src/o_grips.c
+++ b/gschem/src/o_grips.c
@@ -903,9 +903,6 @@ void o_grips_start_circle(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
 /*! \brief Initialize grip motion process for a line.
  *  This function starts the move of one of the two grips of the line
  *  object <B>o_current</B>.
- *  The line and its grips are first erased. The move of the grips is
- *  materializd with a temporary line in selection color drawn over the
- *  sheet with an xor-function.
  *
  *  During the move of the grip, the line is described by
  *  (<B>w_current->first_wx</B>,<B>w_current->first_wy</B>) and
diff --git a/gschem/src/o_line.c b/gschem/src/o_line.c
index de3faee..a3a7c8b 100644
--- a/gschem/src/o_line.c
+++ b/gschem/src/o_line.c
@@ -136,8 +136,7 @@ void o_line_invalidate_rubber (GSCHEM_TOPLEVEL *w_current)
  *  \par Function Description
  *  This function is used to draw the line object described by
  *  <B>*o_current</B> after applying a translation on the two directions of
- *  <B>dx</B> and <B>dy</B> in world units. It uses and XOR function to draw the
- *  translated line over the current sheet.
+ *  <B>dx</B> and <B>dy</B> in world units.
  *
  *  \param [in] w_current  The GSCHEM_TOPLEVEL object.
  *  \param [in] dx         Delta x coordinate for line.
@@ -161,14 +160,12 @@ void o_line_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_cu
   }
 
   /* changed for dark color stuff */
-  gdk_gc_set_foreground(w_current->outline_xor_gc,
-                        x_get_darkcolor(color));
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (color));
   
   WORLDtoSCREEN(toplevel, o_current->line->x[0] + dx, o_current->line->y[0] + dy, &sx[0], &sy[0]);
   WORLDtoSCREEN(toplevel, o_current->line->x[1] + dx, o_current->line->y[1] + dy, &sx[1], &sy[1]);
 
-  gdk_draw_line (w_current->drawable, w_current->outline_xor_gc,
-                 sx[0], sy[0], sx[1], sy[1]);
+  gdk_draw_line (w_current->drawable, w_current->gc, sx[0], sy[0], sx[1], sy[1]);
 }
 
 /*! \brief Start process to input a new line.
@@ -180,7 +177,7 @@ void o_line_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_cu
  *  ends of the line as (<B>w_current->first_wx</B>,<B>w_current->first_wy</B>) and
  *  (<B>w_current->second_wx</B>,<B>w_current->second_wy</B>).
  *
- *  A temporary line is xor-drawn during the process with the selection color
+ *  A temporary line is drawn during the process with the selection color
  *  and changed according to the position of the mouse pointer.
  *
  *  \param [in] w_current  The GSCHEM_TOPLEVEL object.
@@ -192,8 +189,7 @@ void o_line_start(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   /* init first_w[x|y], second_w[x|y] to describe line */
   w_current->first_wx = w_current->second_wx = w_x;
   w_current->first_wy = w_current->second_wy = w_y;
-  
-  /* draw init xor */
+
   o_line_invalidate_rubber (w_current);
   w_current->rubber_visible = 1;
 }
@@ -219,7 +215,6 @@ void o_line_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 
   g_assert( w_current->inside_action != 0 );
 
-  /* erase xor image */
   /* Don't bother.. the real object is invalidated, its in the same place */
   /* o_line_invalidate_rubber (w_current); */
   w_current->rubber_visible = 0;
@@ -262,14 +257,6 @@ void o_line_motion (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 
   g_assert( w_current->inside_action != 0 );
 
-  /*
-   * The current temporary line is described by the two points
-   * (<B>w_current->first_wx</B>,<B>w_current->first_wy</B>) and
-   * (<B>w_current->second_wx</B>,<B>w_current->second_wy</B>) as end of the line.
-   *
-   * This line is xor-drawn : if the line was already displayed, it is
-   * erased. If the line was not already displayed it is drawn.
-   */
   if (w_current->rubber_visible)
     o_line_invalidate_rubber (w_current);
 
@@ -292,12 +279,7 @@ void o_line_motion (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
       w_current->second_wx = w_current->first_wx;
     }
   }
-  
-  /*
-   * The updated line is finally again xor-drawn : before the call to this
-   * function, if the line was displayed, it has been erased, updated and
-   * displayed again.
-   */
+
   o_line_invalidate_rubber (w_current);
   w_current->rubber_visible = 1;
 }
@@ -320,12 +302,11 @@ void o_line_draw_rubber (GSCHEM_TOPLEVEL *w_current)
   WORLDtoSCREEN(toplevel, w_current->second_wx, w_current->second_wy, &x2, &y2);
 
   /* draw the circle from the w_current variables */
-  /* with xor-function */
-  gdk_gc_set_foreground (w_current->xor_gc, x_get_darkcolor (SELECT_COLOR));
-  gdk_gc_set_line_attributes(w_current->xor_gc, 0,
-			     GDK_LINE_SOLID, GDK_CAP_NOT_LAST, 
-			     GDK_JOIN_MITER);
-  gdk_draw_line (w_current->drawable, w_current->xor_gc, x1, y1, x2, y2);
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (SELECT_COLOR));
+  gdk_gc_set_line_attributes (w_current->gc, 0,
+                              GDK_LINE_SOLID, GDK_CAP_NOT_LAST,
+                              GDK_JOIN_MITER);
+  gdk_draw_line (w_current->drawable, w_current->gc, x1, y1, x2, y2);
 }
 
 /*! \brief Draw grip marks on line.
diff --git a/gschem/src/o_net.c b/gschem/src/o_net.c
index bdd7031..483247a 100644
--- a/gschem/src/o_net.c
+++ b/gschem/src/o_net.c
@@ -152,25 +152,24 @@ void o_net_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_cur
     color = o_current->color;
   }
 
-  gdk_gc_set_foreground(w_current->outline_xor_gc,
-			x_get_darkcolor(color));
+  gdk_gc_set_foreground(w_current->gc, x_get_darkcolor (color));
 
   if (toplevel->net_style == THICK ) {
     size = SCREENabs(toplevel, NET_WIDTH);
-    gdk_gc_set_line_attributes(w_current->outline_xor_gc, size+1,
-                               GDK_LINE_SOLID,
-                               GDK_CAP_NOT_LAST,
-                               GDK_JOIN_MITER);
+    gdk_gc_set_line_attributes (w_current->gc, size+1,
+                                GDK_LINE_SOLID,
+                                GDK_CAP_NOT_LAST,
+                                GDK_JOIN_MITER);
   }
 
   WORLDtoSCREEN(toplevel, o_current->line->x[0] + dx, o_current->line->y[0] + dy, &sx[0], &sy[0]);
   WORLDtoSCREEN(toplevel, o_current->line->x[1] + dx, o_current->line->y[1] + dy, &sx[1], &sy[1]);
 
-  gdk_draw_line (w_current->drawable, w_current->outline_xor_gc,
+  gdk_draw_line (w_current->drawable, w_current->gc,
                  sx[0], sy[0], sx[1], sy[1]);
 
   if (toplevel->net_style == THICK ) {
-    gdk_gc_set_line_attributes(w_current->outline_xor_gc, 0,
+    gdk_gc_set_line_attributes(w_current->gc, 0,
                                GDK_LINE_SOLID,
                                GDK_CAP_NOT_LAST,
                                GDK_JOIN_MITER);
@@ -200,8 +199,7 @@ void o_net_draw_stretch (GSCHEM_TOPLEVEL *w_current,
     color = o_current->color;
   }
 
-  gdk_gc_set_foreground(w_current->outline_xor_gc,
-			x_get_darkcolor(color));
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor(color));
 
   if (whichone == 0) {
     dx1 = dx;
@@ -220,7 +218,7 @@ void o_net_draw_stretch (GSCHEM_TOPLEVEL *w_current,
   WORLDtoSCREEN( toplevel, o_current->line->x[0] + dx1, o_current->line->y[0] + dy1, &sx[0], &sy[0] );
   WORLDtoSCREEN( toplevel, o_current->line->x[1] + dx2, o_current->line->y[1] + dy2, &sx[1], &sy[1] );
 
-  gdk_draw_line (w_current->drawable, w_current->outline_xor_gc,
+  gdk_draw_line (w_current->drawable, w_current->gc,
                  sx[0], sy[0], sx[1], sy[1]);
 }
 
@@ -838,18 +836,18 @@ void o_net_draw_rubber(GSCHEM_TOPLEVEL *w_current)
 
   if (toplevel->net_style == THICK) {
     size = SCREENabs(toplevel, NET_WIDTH);
-    gdk_gc_set_line_attributes(w_current->xor_gc, size,
-			       GDK_LINE_SOLID,
-			       GDK_CAP_NOT_LAST, GDK_JOIN_MITER);
+    gdk_gc_set_line_attributes (w_current->gc, size,
+                                GDK_LINE_SOLID,
+                                GDK_CAP_NOT_LAST, GDK_JOIN_MITER);
   }
   size = max(size, 0);
 
-  gdk_gc_set_foreground (w_current->xor_gc, x_get_darkcolor (SELECT_COLOR));
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (SELECT_COLOR));
 
   if (w_current->magneticnet_mode) {
     if (w_current->magnetic_wx != -1 && w_current->magnetic_wy != -1) {
       magnetic_halfsize = max(4*size, MAGNETIC_HALFSIZE);
-      gdk_draw_arc (w_current->drawable, w_current->xor_gc, FALSE,
+      gdk_draw_arc (w_current->drawable, w_current->gc, FALSE,
                     magnetic_x - magnetic_halfsize,
                     magnetic_y - magnetic_halfsize,
                     2 * magnetic_halfsize, 2 * magnetic_halfsize,
@@ -858,17 +856,17 @@ void o_net_draw_rubber(GSCHEM_TOPLEVEL *w_current)
   }
 
   /* draw primary line */
-  gdk_draw_line (w_current->drawable, w_current->xor_gc,
+  gdk_draw_line (w_current->drawable, w_current->gc,
                  first_x, first_y, second_x, second_y);
 
   /* Draw secondary line */
-  gdk_draw_line (w_current->drawable, w_current->xor_gc,
+  gdk_draw_line (w_current->drawable, w_current->gc,
                  second_x, second_y, third_x, third_y);
 
   if (toplevel->net_style == THICK) {
-    gdk_gc_set_line_attributes(w_current->xor_gc, 0,
-			       GDK_LINE_SOLID,
-			       GDK_CAP_NOT_LAST, GDK_JOIN_MITER);
+    gdk_gc_set_line_attributes (w_current->gc, 0,
+                                GDK_LINE_SOLID,
+                                GDK_CAP_NOT_LAST, GDK_JOIN_MITER);
   }
 }
 
diff --git a/gschem/src/o_path.c b/gschem/src/o_path.c
index fe30178..b29958d 100644
--- a/gschem/src/o_path.c
+++ b/gschem/src/o_path.c
@@ -546,8 +546,7 @@ void o_path_invalidate_rubber (GSCHEM_TOPLEVEL *w_current)
  *  \par Function Description
  *  This function is used to draw the path object described by
  *  <B>*o_current</B> after applying a translation on the two directions of
- *  <B>dx</B> and <B>dy</B> in world units. It uses and XOR function to draw the
- *  translated path over the current sheet.
+ *  <B>dx</B> and <B>dy</B> in world units.
  *
  *  \param [in] w_current  The GSCHEM_TOPLEVEL object.
  *  \param [in] dx         Delta x coordinate for path.
@@ -574,17 +573,16 @@ void o_path_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_cu
     color = o_current->color;
   }
 
-  gdk_gc_set_foreground(w_current->outline_xor_gc,
-                        x_get_darkcolor(color));
-  gdk_gc_set_line_attributes(w_current->xor_gc, 0, GDK_LINE_SOLID,
-                             GDK_CAP_NOT_LAST, GDK_JOIN_MITER);
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor(color));
+  gdk_gc_set_line_attributes (w_current->gc, 0, GDK_LINE_SOLID,
+                              GDK_CAP_NOT_LAST, GDK_JOIN_MITER);
 
-  /* Stroke only, no fill for XOR */
+  /* Stroke only, no fill for place drawing */
   if (path->sections[path->num_sections - 1].code == PATH_END)
-    gdk_draw_polygon (w_current->drawable, w_current->xor_gc,
+    gdk_draw_polygon (w_current->drawable, w_current->gc,
                       FALSE, points, num_points);
   else
-    gdk_draw_lines (w_current->drawable, w_current->xor_gc,
+    gdk_draw_lines (w_current->drawable, w_current->gc,
                     points, num_points);
 
   g_free (points);
@@ -599,9 +597,6 @@ void o_path_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_cu
  *  ends of the path as (<B>w_current->first_wx</B>,<B>w_current->first_wy</B>) and
  *  (<B>w_current->second_wx</B>,<B>w_current->second_wy</B>).
  *
- *  A temporary path is xor-drawn during the process with the selection color
- *  and changed according to the position of the mouse pointer.
- *
  *  \param [in] w_current  The GSCHEM_TOPLEVEL object.
  *  \param [in] w_x        Current x coordinate of pointer in world units.
  *  \param [in] w_y        Current y coordinate of pointer in world units.
@@ -687,16 +682,16 @@ void o_path_draw_rubber (GSCHEM_TOPLEVEL *w_current)
     return;
   }
 
-  gdk_gc_set_foreground (w_current->xor_gc, x_get_darkcolor (SELECT_COLOR));
-  gdk_gc_set_line_attributes(w_current->xor_gc, 0, GDK_LINE_SOLID,
-                             GDK_CAP_NOT_LAST, GDK_JOIN_MITER);
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (SELECT_COLOR));
+  gdk_gc_set_line_attributes (w_current->gc, 0, GDK_LINE_SOLID,
+                              GDK_CAP_NOT_LAST, GDK_JOIN_MITER);
 
   /* Stroke only, no fill for rubberbanding */
   if (path->sections[path->num_sections - 1].code == PATH_END)
-    gdk_draw_polygon (w_current->drawable, w_current->xor_gc,
+    gdk_draw_polygon (w_current->drawable, w_current->gc,
                       FALSE, points, num_points);
   else
-    gdk_draw_lines (w_current->drawable, w_current->xor_gc,
+    gdk_draw_lines (w_current->drawable, w_current->gc,
                     points, num_points);
 
   g_free (points);
@@ -721,24 +716,18 @@ static void draw_control_lines (GSCHEM_TOPLEVEL *w_current,
   int next_x, next_y;
   int last_x = 0, last_y = 0;
   PATH_SECTION *section;
-  GdkGC *gc;
   GdkColor *color;
 
-  /* If the override color is set, we're erasing, and should paint
-   * solid rather than XOR */
-
   if (toplevel->override_color != -1 ) {
     /* override : use the override_color instead */
     color = x_get_color(toplevel->override_color);
-    gc = w_current->gc;
   } else {
     /* use the normal selection color */
     color = x_get_darkcolor (SELECT_COLOR);
-    gc = w_current->outline_xor_gc;
   }
 
   /* set the color for the grip */
-  gdk_gc_set_foreground (gc, color);
+  gdk_gc_set_foreground (w_current->gc, color);
 
   for (i = 0; i <  o_current->path->num_sections; i++) {
     section = &o_current->path->sections[i];
@@ -751,9 +740,9 @@ static void draw_control_lines (GSCHEM_TOPLEVEL *w_current,
     case PATH_CURVETO:
       /* Two control point grips */
       WORLDtoSCREEN (toplevel, section->x1, section->y1, &x, &y);
-      gdk_draw_line (w_current->drawable, gc, last_x, last_y, x, y);
+      gdk_draw_line (w_current->drawable, w_current->gc, last_x, last_y, x, y);
       WORLDtoSCREEN (toplevel, section->x2, section->y2, &x, &y);
-      gdk_draw_line (w_current->drawable, gc, next_x, next_y, x, y);
+      gdk_draw_line (w_current->drawable, w_current->gc, next_x, next_y, x, y);
       /* Fall through */
     case PATH_MOVETO:
     case PATH_MOVETO_OPEN:
diff --git a/gschem/src/o_picture.c b/gschem/src/o_picture.c
index 54b4dff..3dd7033 100644
--- a/gschem/src/o_picture.c
+++ b/gschem/src/o_picture.c
@@ -228,7 +228,7 @@ void o_picture_invalidate_rubber (GSCHEM_TOPLEVEL *w_current)
  *
  *  The old values are inside the <B>w_current</B> pointed structure. Old
  *  width, height and left and top values are recomputed by the corresponding
- *  macros. The box is then erased by performing a xor-drawing over the box.
+ *  macros.
  *
  *  \param [in] w_current  The GSCHEM_TOPLEVEL object.
  *  \param [in] w_x        Current x coordinate of pointer in world units.
@@ -268,9 +268,6 @@ void o_picture_motion (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
  *  <B>w_current->first_wy</B>) and the second corner is at
  *  (<B>w_current->second_wx</B>,<B>w_current->second_wy</B>.
  *
- *  The box is drawn with a xor-function over the current sheet with the
- *  selection color.
- *
  *  \param [in] w_current  The GSCHEM_TOPLEVEL object.
  */
 void o_picture_draw_rubber (GSCHEM_TOPLEVEL *w_current)
@@ -294,11 +291,11 @@ void o_picture_draw_rubber (GSCHEM_TOPLEVEL *w_current)
 	 picture_left, picture_top, picture_width, picture_height);
 #endif
   /* draw the picture from the previous variables */
-  gdk_gc_set_foreground (w_current->xor_gc, x_get_darkcolor (SELECT_COLOR));
-  gdk_gc_set_line_attributes(w_current->xor_gc, 0, 
-			     GDK_LINE_SOLID, GDK_CAP_NOT_LAST, 
-			     GDK_JOIN_MITER);
-  gdk_draw_rectangle (w_current->drawable, w_current->xor_gc,
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (SELECT_COLOR));
+  gdk_gc_set_line_attributes (w_current->gc, 0,
+                              GDK_LINE_SOLID, GDK_CAP_NOT_LAST,
+                              GDK_JOIN_MITER);
+  gdk_draw_rectangle (w_current->drawable, w_current->gc,
                       FALSE, left, top, width, height);
 }
 
@@ -463,8 +460,7 @@ void o_picture_draw_grips(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
 /*! \brief Draw a picture described by OBJECT with translation
  *  \par Function Description
  *  This function daws the picture object described by <B>*o_current</B>
- *  translated by the vector (<B>dx</B>,<B>dy</B>) with an xor-function over
- *  the current sheet.
+ *  translated by the vector (<B>dx</B>,<B>dy</B>).
  *  The translation vector is in world unit.
  *
  *  The picture is displayed with the color of the object.
@@ -481,9 +477,6 @@ void o_picture_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o
   int screen_x2, screen_y2;
   int color;
 
-#if DEBUG
-  printf("o_picture_draw_xor called.\n");
-#endif
   if (o_current->picture == NULL) {
     return;
   }
@@ -498,11 +491,10 @@ void o_picture_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o
   } else {
     color = o_current->color;
   }
-  
-  gdk_gc_set_foreground(w_current->outline_xor_gc,
-                        x_get_darkcolor(color));
+
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor(color));
   gdk_draw_rectangle (w_current->drawable,
-                      w_current->outline_xor_gc, FALSE,
+                      w_current->gc, FALSE,
                       screen_x1,
                       screen_y1,
                       abs(screen_x2 - screen_x1),
diff --git a/gschem/src/o_pin.c b/gschem/src/o_pin.c
index a1183ce..2845cdc 100644
--- a/gschem/src/o_pin.c
+++ b/gschem/src/o_pin.c
@@ -112,27 +112,27 @@ void o_pin_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_cur
     color = o_current->color;
   }
 
-  gdk_gc_set_foreground(w_current->xor_gc, x_get_darkcolor(color));
+  gdk_gc_set_foreground(w_current->gc, x_get_darkcolor (color));
 
   if (toplevel->pin_style == THICK ) {
     size = SCREENabs(toplevel, PIN_WIDTH);
-    gdk_gc_set_line_attributes(w_current->xor_gc, size,
-                               GDK_LINE_SOLID,
-                               GDK_CAP_NOT_LAST,
-                               GDK_JOIN_MITER);
+    gdk_gc_set_line_attributes (w_current->gc, size,
+                                GDK_LINE_SOLID,
+                                GDK_CAP_NOT_LAST,
+                                GDK_JOIN_MITER);
   }
 
   WORLDtoSCREEN(toplevel, o_current->line->x[0] + dx, o_current->line->y[0] + dy, &sx[0], &sy[0]);
   WORLDtoSCREEN(toplevel, o_current->line->x[1] + dx, o_current->line->y[1] + dy, &sx[1], &sy[1]);
 
-  gdk_draw_line (w_current->drawable, w_current->xor_gc,
+  gdk_draw_line (w_current->drawable, w_current->gc,
                  sx[0], sy[0], sx[1], sy[1]);
 
   if (toplevel->pin_style == THICK ) {
-    gdk_gc_set_line_attributes(w_current->xor_gc, 0,
-                               GDK_LINE_SOLID,
-                               GDK_CAP_NOT_LAST,
-                               GDK_JOIN_MITER);
+    gdk_gc_set_line_attributes (w_current->gc, 0,
+                                GDK_LINE_SOLID,
+                                GDK_CAP_NOT_LAST,
+                                GDK_JOIN_MITER);
   }
 }
 
@@ -278,19 +278,19 @@ void o_pin_draw_rubber (GSCHEM_TOPLEVEL *w_current)
     if (size < 0)
       size=0;
 
-    gdk_gc_set_line_attributes(w_current->xor_gc, size,
-                               GDK_LINE_SOLID,
-                               GDK_CAP_NOT_LAST,
-                               GDK_JOIN_MITER);
+    gdk_gc_set_line_attributes (w_current->gc, size,
+                                GDK_LINE_SOLID,
+                                GDK_CAP_NOT_LAST,
+                                GDK_JOIN_MITER);
   }
 
-  gdk_gc_set_foreground (w_current->xor_gc, x_get_darkcolor (SELECT_COLOR));
-  gdk_draw_line (w_current->drawable, w_current->xor_gc, x1, y1, x2, y2);
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (SELECT_COLOR));
+  gdk_draw_line (w_current->drawable, w_current->gc, x1, y1, x2, y2);
 
   if (toplevel->net_style == THICK ) {
-    gdk_gc_set_line_attributes(w_current->xor_gc, 0,
-                               GDK_LINE_SOLID,
-                               GDK_CAP_NOT_LAST,
-                               GDK_JOIN_MITER);
+    gdk_gc_set_line_attributes (w_current->gc, 0,
+                                GDK_LINE_SOLID,
+                                GDK_CAP_NOT_LAST,
+                                GDK_JOIN_MITER);
   }
 }
diff --git a/gschem/src/o_place.c b/gschem/src/o_place.c
index 76ba9f9..370c770 100644
--- a/gschem/src/o_place.c
+++ b/gschem/src/o_place.c
@@ -136,13 +136,11 @@ void o_place_motion (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 }
 
 
-/*! \brief XOR draw a bounding box or outline for OBJECT placement
+/*! \brief Invalidate bounding box or outline for OBJECT placement
  *
  *  \par Function Description
- *  This function XOR draws either the OBJECTS in the place list
- *  or a rectangle around their bounding box, depending upon the
- *  currently selected w_current->actionfeedback_mode. This takes the
- *  value BOUNDINGBOX or OUTLINE.
+ *  This function invalidates the bounding box where objects would be
+ *  drawn by o_place_draw_rubber()
  *
  * The function applies manhatten mode constraints to the coordinates
  * before drawing if the CONTROL key is recording as being pressed in
@@ -196,10 +194,9 @@ void o_place_invalidate_rubber (GSCHEM_TOPLEVEL *w_current, int drawing)
   /* Adjust the coordinates according to the movement constraints */
 
   /* Need to update the w_current->{first,second}_w{x,y} coords even
-   * though we're only invalidating, because the move rubberband code
+   * though we're only invalidating because the move rubberband code
    * (which may execute right after this function) expects these
-   * coordinates to be correct. It then XORs directly onto the screen,
-   * not via an invalidation / redraw.
+   * coordinates to be correct.
    */
   if (w_current->drawbounding_action_mode == CONSTRAINED) {
     if (abs (diff_x) >= abs (diff_y)) {
@@ -221,10 +218,10 @@ void o_place_invalidate_rubber (GSCHEM_TOPLEVEL *w_current, int drawing)
 }
 
 
-/*! \brief XOR draw a bounding box or outline for OBJECT placement
+/*! \brief Draw a bounding box or outline for OBJECT placement
  *
  *  \par Function Description
- *  This function XOR draws either the OBJECTS in the place list
+ *  This function draws either the OBJECTS in the place list
  *  or a rectangle around their bounding box, depending upon the
  *  currently selected w_current->actionfeedback_mode. This takes the
  *  value BOUNDINGBOX or OUTLINE.
@@ -287,7 +284,7 @@ void o_place_draw_rubber (GSCHEM_TOPLEVEL *w_current, int drawing)
     }
   }
 
-  /* XOR draw with the appropriate mode */
+  /* Draw with the appropriate mode */
   if (w_current->last_drawb_mode == BOUNDINGBOX) {
 
     /* Find the bounds of the drawing to be done */
@@ -297,10 +294,9 @@ void o_place_draw_rubber (GSCHEM_TOPLEVEL *w_current, int drawing)
     WORLDtoSCREEN(toplevel, left + diff_x, top + diff_y, &s_left, &s_top);
     WORLDtoSCREEN(toplevel, right + diff_x, bottom + diff_y, &s_right, &s_bottom);
 
-    gdk_gc_set_foreground (w_current->bounding_xor_gc,
-                           x_get_darkcolor (BOUNDINGBOX_COLOR));
+    gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (BOUNDINGBOX_COLOR));
     gdk_draw_rectangle (w_current->drawable,
-                        w_current->bounding_xor_gc, FALSE,
+                        w_current->gc, FALSE,
                         s_left, s_bottom,
                         s_right - s_left, s_top - s_bottom);
   } else {
diff --git a/gschem/src/o_select.c b/gschem/src/o_select.c
index fe43580..feb8ae4 100644
--- a/gschem/src/o_select.c
+++ b/gschem/src/o_select.c
@@ -326,8 +326,8 @@ void o_select_box_draw_rubber (GSCHEM_TOPLEVEL *w_current)
   box_left = min(x1, x2);
   box_top = min(y1, y2);
 
-  gdk_gc_set_foreground(w_current->xor_gc, x_get_darkcolor (SELECT_COLOR));
-  gdk_draw_rectangle (w_current->drawable, w_current->xor_gc,
+  gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (SELECT_COLOR));
+  gdk_draw_rectangle (w_current->drawable, w_current->gc,
                       FALSE,
                       box_left, box_top, box_width, box_height);
 }
diff --git a/gschem/src/o_text.c b/gschem/src/o_text.c
index d507aba..e5cf68d 100644
--- a/gschem/src/o_text.c
+++ b/gschem/src/o_text.c
@@ -253,11 +253,10 @@ void o_text_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_cu
       color = o_current->color;
     }
 
-    gdk_gc_set_foreground(w_current->outline_xor_gc,
-                          x_get_darkcolor(color));
+    gdk_gc_set_foreground (w_current->gc, x_get_darkcolor (color));
 
     gdk_draw_rectangle (w_current->drawable,
-                        w_current->outline_xor_gc,
+                        w_current->gc,
                         FALSE,
                         left,
                         top,
diff --git a/gschem/src/x_color.c b/gschem/src/x_color.c
index ca444db..fed211c 100644
--- a/gschem/src/x_color.c
+++ b/gschem/src/x_color.c
@@ -141,18 +141,6 @@ void x_color_allocate (void)
       gdk_outline_colors[i]->green = c.g + (c.g<<8);
       gdk_outline_colors[i]->blue = c.b + (c.b<<8);
 
-      /* Make sure the outline color is correct for non-black backgrounds
-       * FIXME: Is this correct?
-       */
-      if (i > 0) {
-        gdk_outline_colors[i]->red =
-          gdk_outline_colors[i]->red ^ gdk_colors[0]->red;
-        gdk_outline_colors[i]->green =
-          gdk_outline_colors[i]->green ^ gdk_colors[0]->green;
-        gdk_outline_colors[i]->blue =
-          gdk_outline_colors[i]->blue ^ gdk_colors[0]->blue;
-      }
-
       error = gdk_color_alloc(colormap, gdk_outline_colors[i]);
 
       if (error == FALSE) {
diff --git a/gschem/src/x_window.c b/gschem/src/x_window.c
index ae5cfff..a2a2ed9 100644
--- a/gschem/src/x_window.c
+++ b/gschem/src/x_window.c
@@ -72,57 +72,12 @@ void x_window_setup (GSCHEM_TOPLEVEL *w_current)
  */
 void x_window_setup_gc(GSCHEM_TOPLEVEL *w_current)
 {
-  GdkGCValues     values;
-  GdkGCValuesMask  values_mask;
-
   w_current->gc = gdk_gc_new(w_current->window);
 
   if (w_current->gc == NULL) {
     fprintf(stderr, _("Couldn't allocate gc\n"));
     exit(-1);
   }
-
-  values.foreground = white;
-  values.background = black;
-
-  values.function = GDK_XOR;
-  values_mask = GDK_GC_FOREGROUND | GDK_GC_BACKGROUND | GDK_GC_FUNCTION;
-  w_current->xor_gc = gdk_gc_new_with_values(w_current->window,
-                                             &values, values_mask);
-
-  if (w_current->xor_gc == NULL) {
-    fprintf(stderr, _("Couldn't allocate xor_gc\n"));
-    exit(-1);
-  }
-
-  values.foreground = white;
-  values.background = black;
-
-  values.function = GDK_XOR;
-  values_mask = GDK_GC_FOREGROUND | GDK_GC_BACKGROUND | GDK_GC_FUNCTION;
-  w_current->outline_xor_gc = gdk_gc_new_with_values(w_current->window,
-                                                     &values, values_mask);
-
-  if (w_current->outline_xor_gc == NULL) {
-    fprintf(stderr, _("Couldn't allocate outline_xor_gc\n"));
-    exit(-1);
-  }
-
-  values.foreground = white;
-  values.background = black;
-
-  values.function = GDK_XOR;
-  values.line_style = GDK_LINE_ON_OFF_DASH;
-  values_mask = GDK_GC_FOREGROUND | GDK_GC_BACKGROUND |
-  GDK_GC_LINE_STYLE | GDK_GC_FUNCTION;
-
-  w_current->bounding_xor_gc = gdk_gc_new_with_values(w_current->window,
-                                                      &values, values_mask);
-
-  if (w_current->bounding_xor_gc == NULL) {
-    fprintf(stderr, _("Couldn't allocate bounding_xor_gc\n"));
-    exit(-1);
-  }
 }
 
 /*! \todo Finish function documentation!!!
@@ -133,9 +88,6 @@ void x_window_setup_gc(GSCHEM_TOPLEVEL *w_current)
 void x_window_free_gc(GSCHEM_TOPLEVEL *w_current)
 {
   gdk_gc_unref(w_current->gc);
-  gdk_gc_unref(w_current->xor_gc);
-  gdk_gc_unref(w_current->bounding_xor_gc);
-  gdk_gc_unref(w_current->outline_xor_gc);
 }
 
 /*! \todo Finish function documentation!!!




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs