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

gEDA-cvs: CVS update: a_zoom.c



  User: pcjc2   
  Date: 07/04/17 16:19:19

  Modified:    .        a_zoom.c g_hook.c g_rc.c g_register.c i_vars.c
                        o_arc.c o_attrib.c o_basic.c o_box.c o_buffer.c
                        o_bus.c o_circle.c o_complex.c o_find.c o_grips.c
                        o_line.c o_misc.c o_move.c o_net.c o_picture.c
                        o_pin.c o_select.c o_text.c
  Log:
  Merge changes from noscreen branch
  
  
  
  
  Revision  Changes    Path
  1.24      +5 -3      eda/geda/gaf/gschem/src/a_zoom.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: a_zoom.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/a_zoom.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -b -r1.23 -r1.24
  --- a_zoom.c	21 Oct 2006 13:56:23 -0000	1.23
  +++ a_zoom.c	17 Apr 2007 20:19:16 -0000	1.24
  @@ -171,9 +171,11 @@
       return;
     }
   
  -  world_get_complex_bounds(w_current, o_current,
  +  if ( !world_get_object_list_bounds(w_current, o_current,
                              &lleft, &ltop,
  -                           &lright, &lbottom);
  +                                     &lright, &lbottom)) {
  +    return;
  +  }
   
   #if DEBUG
     printf("in a_zoom_extents:  left: %d, right: %d, top: %d, bottom: %d\n",
  
  
  
  1.20      +4 -11     eda/geda/gaf/gschem/src/g_hook.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: g_hook.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/g_hook.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -b -r1.19 -r1.20
  --- g_hook.c	14 Apr 2007 18:11:44 -0000	1.19
  +++ g_hook.c	17 Apr 2007 20:19:16 -0000	1.20
  @@ -287,7 +287,6 @@
     int alignment = -2;
     int rotation = 0;
     int x = -1, y = -1;
  -  gboolean changed = FALSE;
   
     SCM_ASSERT (SCM_STRINGP(scm_colorname), scm_colorname,
   	      SCM_ARG2, "set-attribute-text-properties!");
  @@ -364,26 +363,18 @@
         o_text_erase(w_current, object);
         if (x != -1) {
   	object->text->x = x;
  -	changed = TRUE;
         }
         if (y != -1) {
   	object->text->y = y;
  -	changed = TRUE;
  -      }
  -      if (changed) {
  -	WORLDtoSCREEN(w_current, x, y, &object->text->screen_x, &object->text->screen_y);
         }
         if (size != -1) {
   	object->text->size = size;
  -	changed = TRUE;
         }
         if (alignment != -1) {
   	object->text->alignment = alignment;
  -	changed = TRUE;
         }
         if (rotation != -1) {
   	object->text->angle = rotation;
  -	changed = TRUE;
         }
         o_text_recreate(w_current, object);
         if (!w_current->DONT_REDRAW) {
  @@ -551,8 +542,10 @@
    *  The object types are those used in (OBJECT *)->type converted into strings.
    *  \return a list of the bounds of the <B>object smob</B>. 
    *  The list has the format: ( (left right) (top bottom) )
  - *  I got top and bottom values reversed from world_get_complex_bounds,
  - *  so don\'t rely on the position in the list. 
  + *  WARNING: top and bottom are mis-named in world-coords,
  + *  top is the smallest "y" value, and bottom is the largest.
  + *  Be careful! This doesn't correspond to what you'd expect,
  + *  nor to the coordinate system who's origin is the bottom, left of the page.
    */
   SCM g_get_object_bounds (SCM object_smob, SCM scm_exclude_attribs, SCM scm_exclude_object_type)
   {
  
  
  
  1.44      +24 -0     eda/geda/gaf/gschem/src/g_rc.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: g_rc.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/g_rc.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -b -r1.43 -r1.44
  --- g_rc.c	10 Feb 2007 19:43:02 -0000	1.43
  +++ g_rc.c	17 Apr 2007 20:19:16 -0000	1.44
  @@ -1776,3 +1776,27 @@
     return SCM_BOOL_T;
   }
   #undef FUNC_NAME
  +
  +/*! \todo Finish function documentation!!!
  + *  \brief
  + *  \par Function Description
  + *
  + */
  +SCM g_rc_select_slack_pixels(SCM pixels)
  +{
  +  int val;
  +
  +  SCM_ASSERT (SCM_INUMP (pixels), pixels, SCM_ARG1, "select-slack-pixels");
  +  
  +  val = SCM_INUM (pixels);
  +
  +  if (val <= 0) {
  +    fprintf(stderr, _("Invalid number of pixels [%d] passed to select-slack-pixels\n"),
  +            val);
  +    val = 4; /* absolute default */
  +  }
  +
  +  default_select_slack_pixels = val;
  +
  +  return SCM_BOOL_T;
  +}
  
  
  
  1.54      +1 -0      eda/geda/gaf/gschem/src/g_register.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: g_register.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/g_register.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -b -r1.53 -r1.54
  --- g_register.c	14 Apr 2007 18:05:15 -0000	1.53
  +++ g_register.c	17 Apr 2007 20:19:16 -0000	1.54
  @@ -152,6 +152,7 @@
     { "mousepan-gain",             1, 0, 0, g_rc_mousepan_gain },
     { "keyboardpan-gain",          1, 0, 0, g_rc_keyboardpan_gain },
     { "print-command",             1, 0, 0, g_rc_print_command },
  +  { "select-slack-pixels",       1, 0, 0, g_rc_select_slack_pixels },
   
     /* backup functions */
     { "auto-save-interval",        1, 0, 0, g_rc_auto_save_interval },
  
  
  
  1.37      +3 -0      eda/geda/gaf/gschem/src/i_vars.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: i_vars.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/i_vars.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -b -r1.36 -r1.37
  --- i_vars.c	10 Feb 2007 19:43:16 -0000	1.36
  +++ i_vars.c	17 Apr 2007 20:19:17 -0000	1.37
  @@ -129,6 +129,7 @@
   int default_text_feedback = ONLY_WHEN_READABLE;
   int default_mousepan_gain = 5;
   int default_keyboardpan_gain = 20;
  +int default_select_slack_pixels = 4;
   
   /*! \todo Finish function documentation!!!
    *  \brief
  @@ -249,5 +250,7 @@
     w_current->mousepan_gain = default_mousepan_gain;
     w_current->keyboardpan_gain = default_keyboardpan_gain;
   
  +  w_current->select_slack_pixels = default_select_slack_pixels;
  +
     w_current->auto_save_interval = default_auto_save_interval;
   }
  
  
  
  1.29      +0 -10     eda/geda/gaf/gschem/src/o_arc.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_arc.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_arc.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -b -r1.28 -r1.29
  --- o_arc.c	25 Feb 2007 02:15:56 -0000	1.28
  +++ o_arc.c	17 Apr 2007 20:19:17 -0000	1.29
  @@ -75,16 +75,6 @@
       return;
     }
   
  -  /*
  -   * The function now recalculates the OBJECT as an arc. It involves
  -   * calculating every single dimensions according to the zoom factor
  -   * and position, dots.
  -   * It also recalculates the bounding box of the object and check
  -   * whether this object is visible or not. If not there is no reason
  -   * to draw it !
  -   */
  -  o_arc_recalc(w_current, o_current);
  -
     world_get_arc_bounds(w_current, o_current,
                          &wleft, &wtop, &wright, &wbottom);
   
  
  
  
  1.28      +3 -3      eda/geda/gaf/gschem/src/o_attrib.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_attrib.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_attrib.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -b -r1.27 -r1.28
  --- o_attrib.c	21 Dec 2006 20:11:11 -0000	1.27
  +++ o_attrib.c	17 Apr 2007 20:19:17 -0000	1.28
  @@ -437,7 +437,7 @@
           break;
       }
     } else {
  -    world_get_complex_bounds(w_current, 
  +    world_get_object_list_bounds(w_current,
                                w_current->page_current->object_head,
                                &left, &top, &right, &bottom);
   	
  
  
  
  1.24      +98 -74    eda/geda/gaf/gschem/src/o_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_basic.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -b -r1.23 -r1.24
  --- o_basic.c	17 Dec 2006 04:14:03 -0000	1.23
  +++ o_basic.c	17 Apr 2007 20:19:17 -0000	1.24
  @@ -106,10 +106,6 @@
       x_repaint_background(w_current);
     }
   
  -  o_recalc_object_list(w_current, w_current->page_current->object_head);
  -  /* Uncomment this when using the complex_place_list for moving and copying */
  -  /*  o_recalc_object_glist(w_current, w_current->page_current->complex_place_list); */
  -
     draw_selected = !(w_current->inside_action &&
   		    ((w_current->event_state == MOVE) ||
   		     (w_current->event_state == ENDMOVE)));
  @@ -284,6 +280,7 @@
     /* static is highly temp */	
     /* you have to make these static... for the once mode */
     static int rleft, rtop, rbottom, rright;
  +  static int w_rleft, w_rtop, w_rbottom, w_rright;
   
     if (!o_list && !o_glist) {
       return;
  @@ -313,18 +310,24 @@
       gdk_gc_set_foreground(w_current->bounding_xor_gc, color);
   
       if (o_list) {
  -      get_object_list_bounds(w_current, o_list,
  -			     &rleft  ,
  -			     &rtop   ,
  -			     &rright ,
  -			     &rbottom);
  -    } else if (o_glist) {
  -      get_object_glist_bounds(w_current, o_glist,
  -			      &rleft  ,
  -			      &rtop   ,
  -			      &rright ,
  -			      &rbottom);
  -    }
  +      world_get_object_list_bounds(w_current, o_list,
  +                             &w_rleft  ,
  +                             &w_rtop   ,
  +                             &w_rright ,
  +                             &w_rbottom);
  +    } else if (o_glist) {
  +      world_get_object_glist_bounds(w_current, o_glist,
  +                                    &w_rleft  ,
  +                                    &w_rtop   ,
  +                                    &w_rright ,
  +                                    &w_rbottom);
  +    }
  +
  +    WORLDtoSCREEN( w_current, w_rleft, w_rtop, 
  +                   &rleft, &rtop );
  +    WORLDtoSCREEN( w_current, w_rright, w_rbottom, 
  +                 &rright, &rbottom );
  +
       gdk_draw_rectangle(w_current->window,
                          w_current->bounding_xor_gc, FALSE,
                          rleft + diff_x,
  @@ -341,17 +344,17 @@
   #endif
   
           if (o_list) {
  -          get_object_list_bounds(w_current, o_list,
  -				 &rleft  ,
  -				 &rtop   ,
  -				 &rright ,
  -				 &rbottom);
  -        } else if (o_glist) {
  -	  get_object_glist_bounds(w_current, o_glist,
  -				  &rleft  ,
  -				  &rtop   ,
  -				  &rright ,
  -				  &rbottom);
  +          world_get_object_list_bounds(w_current, o_list,
  +				 &w_rleft  ,
  +				 &w_rtop   ,
  +				 &w_rright ,
  +				 &w_rbottom);
  +        } else if (o_glist) {
  +	  world_get_object_glist_bounds(w_current, o_glist,
  +				  &w_rleft  ,
  +				  &w_rtop   ,
  +				  &w_rright ,
  +				  &w_rbottom);
   	}
   
           diff_x = w_current->last_x - w_current->start_x;
  @@ -359,6 +362,10 @@
           gdk_gc_set_foreground(w_current->gc,
                                 x_get_color(
                                             w_current->background_color) );
  +        WORLDtoSCREEN( w_current, w_rleft, w_rtop, 
  +                       &rleft, &rtop );
  +        WORLDtoSCREEN( w_current, w_rright, w_rbottom, 
  +                       &rright, &rbottom );
           gdk_draw_rectangle(w_current->window,
                              w_current->gc, FALSE,
                              rleft   + diff_x,
  @@ -410,21 +417,25 @@
         
       } else {
         if (o_list) {
  -        get_object_list_bounds(w_current, o_list,
  -			       &rleft  ,
  -			       &rtop   ,
  -			       &rright ,
  -			       &rbottom);
  -      } else if (o_glist) {
  -	get_object_glist_bounds(w_current, o_glist,
  -				&rleft  ,
  -				&rtop   ,
  -				&rright ,
  -				&rbottom);
  +        world_get_object_list_bounds(w_current, o_list,
  +			       &w_rleft  ,
  +			       &w_rtop   ,
  +			       &w_rright ,
  +			       &w_rbottom);
  +      } else if (o_glist) {
  +	world_get_object_glist_bounds(w_current, o_glist,
  +				&w_rleft  ,
  +				&w_rtop   ,
  +				&w_rright ,
  +				&w_rbottom);
         }
   
         gdk_gc_set_foreground(w_current->bounding_xor_gc,
                               color);
  +      WORLDtoSCREEN( w_current, w_rleft, w_rtop, 
  +                     &rleft, &rtop );
  +      WORLDtoSCREEN( w_current, w_rright, w_rbottom, 
  +                     &rright, &rbottom );
         gdk_draw_rectangle(w_current->window,
                            w_current->bounding_xor_gc, FALSE,
                            rleft + diff_x,
  @@ -457,21 +468,25 @@
   
       } else {
         if (o_list) {
  -        get_object_list_bounds(w_current, o_list,
  -			       &rleft  ,
  -			       &rtop   ,
  -			       &rright ,
  -			       &rbottom);
  -      } else if (o_glist) {
  -	get_object_glist_bounds(w_current, o_glist,
  -				&rleft  ,
  -				&rtop   ,
  -				&rright ,
  -				&rbottom);
  +        world_get_object_list_bounds(w_current, o_list,
  +			       &w_rleft  ,
  +			       &w_rtop   ,
  +			       &w_rright ,
  +			       &w_rbottom);
  +      } else if (o_glist) {
  +	world_get_object_glist_bounds(w_current, o_glist,
  +				&w_rleft  ,
  +				&w_rtop   ,
  +				&w_rright ,
  +				&w_rbottom);
         }
         
         gdk_gc_set_foreground(w_current->bounding_xor_gc,
                               color);
  +      WORLDtoSCREEN( w_current, w_rleft, w_rtop, 
  +                     &rleft, &rtop );
  +      WORLDtoSCREEN( w_current, w_rright, w_rbottom, 
  +                     &rright, &rbottom );
         gdk_draw_rectangle(w_current->window,
                            w_current->bounding_xor_gc,
                            FALSE,
  @@ -519,17 +534,17 @@
             /*! \todo why are we doing this here...?
              * probably a reason */
             if (o_list) {
  -            get_object_list_bounds(w_current, o_list,
  -				   &rleft  ,
  -				   &rtop   ,
  -				   &rright ,
  -				   &rbottom);
  -          } else if (o_glist) {
  -	    get_object_glist_bounds(w_current, o_glist,
  -				    &rleft  ,
  -				    &rtop   ,
  -				    &rright ,
  -				    &rbottom);
  +            world_get_object_list_bounds(w_current, o_list,
  +				   &w_rleft  ,
  +				   &w_rtop   ,
  +				   &w_rright ,
  +				   &w_rbottom);
  +          } else if (o_glist) {
  +	    world_get_object_glist_bounds(w_current, o_glist,
  +				    &w_rleft  ,
  +				    &w_rtop   ,
  +				    &w_rright ,
  +				    &w_rbottom);
   	  }
   
           }
  @@ -553,17 +568,17 @@
   
       if (firsttime == TRUE) {
         if (o_list) {
  -        get_object_list_bounds(w_current, o_list,
  -			       &rleft  ,
  -			       &rtop   ,
  -			       &rright ,
  -			       &rbottom);
  -      } else if (o_glist) {
  -	get_object_glist_bounds(w_current, o_glist,
  -				&rleft  ,
  -				&rtop   ,
  -				&rright ,
  -				&rbottom);
  +        world_get_object_list_bounds(w_current, o_list,
  +			       &w_rleft  ,
  +			       &w_rtop   ,
  +			       &w_rright ,
  +			       &w_rbottom);
  +      } else if (o_glist) {
  +	world_get_object_glist_bounds(w_current, o_glist,
  +				&w_rleft  ,
  +				&w_rtop   ,
  +				&w_rright ,
  +				&w_rbottom);
         }
         
         /*printf("once\n");*/
  @@ -572,6 +587,10 @@
       diff_x = w_current->last_x - w_current->start_x;
       diff_y = w_current->last_y - w_current->start_y;
       gdk_gc_set_foreground(w_current->bounding_xor_gc, color);
  +    WORLDtoSCREEN( w_current, w_rleft, w_rtop, 
  +                   &rleft, &rtop );
  +    WORLDtoSCREEN( w_current, w_rright, w_rbottom, 
  +                   &rright, &rbottom );
       gdk_draw_rectangle(w_current->window,
                          w_current->bounding_xor_gc, FALSE,
                          rleft   + diff_x,
  @@ -605,6 +624,7 @@
   {
     int diff_x, diff_y;
     int rleft, rtop, rright, rbottom;
  +  int w_rleft, w_rtop, w_rright, w_rbottom;
   
     if ( (o_list == NULL) && (s_list == NULL)) {
       /* this is an error condition */
  @@ -618,17 +638,17 @@
     }
   
     if (o_list) {
  -    get_object_list_bounds(w_current, o_list,
  -			   &rleft  ,
  -			   &rtop   ,
  -			   &rright ,
  -			   &rbottom);
  +    world_get_object_list_bounds(w_current, o_list,
  +			   &w_rleft  ,
  +			   &w_rtop   ,
  +			   &w_rright ,
  +			   &w_rbottom);
     } else if (s_list) {
  -    get_object_glist_bounds(w_current, s_list,
  -			    &rleft  ,
  -			    &rtop   ,
  -			    &rright ,
  -			    &rbottom);
  +    world_get_object_glist_bounds(w_current, s_list,
  +			    &w_rleft  ,
  +			    &w_rtop   ,
  +			    &w_rright ,
  +			    &w_rbottom);
     }
   
     diff_x = w_current->last_x - w_current->start_x;
  @@ -636,6 +656,10 @@
   
     gdk_gc_set_foreground(w_current->gc,
                           x_get_color(w_current->background_color) );
  +  WORLDtoSCREEN( w_current, w_rleft, w_rtop, 
  +                 &rleft, &rtop );
  +  WORLDtoSCREEN( w_current, w_rright, w_rbottom, 
  +                 &rright, &rbottom );
     gdk_draw_rectangle(w_current->window, w_current->gc, FALSE,
                        rleft   + diff_x,
                        rtop    + diff_y,
  
  
  
  1.27      +1 -10     eda/geda/gaf/gschem/src/o_box.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_box.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_box.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -b -r1.26 -r1.27
  --- o_box.c	25 Feb 2007 02:15:56 -0000	1.26
  +++ o_box.c	17 Apr 2007 20:19:17 -0000	1.27
  @@ -77,18 +77,9 @@
       return;
     }
   
  -  /*
  -   * The function now recalculates the OBJECT as a box. It involves
  -   * calculating every single dimensions according to the zoom factor
  -   * the position, @dots{}. It also recalculates the bounding box of the
  -   * object and check whether this object is visible or not. If not there
  -   * is no reason to draw it!
  -   */
  -  o_box_recalc(w_current, o_current);
  -
   	/* Get read to check for visibility of this line by using it's
   	 * bounding box */
  -  world_get_box_bounds(w_current, o_current->box,
  +  world_get_box_bounds(w_current, o_current,
                          &wleft, &wtop, &wright, &wbottom);
   	
     if ( (w_current->DONT_REDRAW == 1) ||
  
  
  
  1.12      +7 -3      eda/geda/gaf/gschem/src/o_buffer.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_buffer.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_buffer.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -b -r1.11 -r1.12
  --- o_buffer.c	24 Feb 2007 18:43:14 -0000	1.11
  +++ o_buffer.c	17 Apr 2007 20:19:17 -0000	1.12
  @@ -121,9 +121,13 @@
       return;
     }
   
  -  world_get_complex_bounds(w_current, object_buffer[buf_num], 
  +  if (!world_get_object_list_bounds(w_current, object_buffer[buf_num],
                              &rleft, &rtop, 
  -                           &rright, &rbottom);
  +                                    &rright, &rbottom)) {
  +    /* If the paste buffer doesn't have any objects
  +     * to define its any bounds, we drop out here */
  +    return;
  +  }
   
     /* snap x and y to the grid, pointed out by Martin Benes */
     x = snap_grid(w_current, rleft);
  
  
  
  1.25      +0 -2      eda/geda/gaf/gschem/src/o_bus.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_bus.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_bus.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -b -r1.24 -r1.25
  --- o_bus.c	24 Feb 2007 18:43:14 -0000	1.24
  +++ o_bus.c	17 Apr 2007 20:19:17 -0000	1.25
  @@ -47,8 +47,6 @@
       return;
     }
   
  -  o_bus_recalc(w_current, o_current);
  -
     /* reuse line's routine */
     if ( (w_current->DONT_REDRAW == 1) || 
          (!o_line_visible(w_current, o_current->line, &x1, &y1, &x2, &y2)) ) {
  
  
  
  1.25      +2 -11     eda/geda/gaf/gschem/src/o_circle.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_circle.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_circle.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -b -r1.24 -r1.25
  --- o_circle.c	25 Feb 2007 02:15:56 -0000	1.24
  +++ o_circle.c	17 Apr 2007 20:19:17 -0000	1.25
  @@ -75,19 +75,10 @@
     }
   	
     /*
  -   * The function now recalculates the OBJECT as a circle. It involves
  -   * calculating every single dimensions according to the zoom factor,
  -   * the position, @dots{}.
  -   * It also recalculates the bounding box of the object and check whether
  -   * this object is visible or not. If not there is no reason to draw it !
  -   */
  -  o_circle_recalc(w_current, o_current);
  -	
  -  /*
      * Get read to check for visibility of this line by using it's
      * bounding box
      */
  -  world_get_circle_bounds(w_current, o_current->circle,
  +  world_get_circle_bounds(w_current, o_current,
                             &wleft, &wtop, &wright, &wbottom);
   	
     if ( (w_current->DONT_REDRAW == 1) || 
  
  
  
  1.33      +23 -32    eda/geda/gaf/gschem/src/o_complex.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_complex.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_complex.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -b -r1.32 -r1.33
  --- o_complex.c	14 Apr 2007 18:05:15 -0000	1.32
  +++ o_complex.c	17 Apr 2007 20:19:17 -0000	1.33
  @@ -40,8 +40,6 @@
    */
   void o_complex_draw(TOPLEVEL *w_current, OBJECT *o_current)
   {
  -  int left, right, top, bottom;
  -
     g_return_if_fail (o_current != NULL); 
     g_return_if_fail (o_current->complex != NULL);
     g_return_if_fail (o_current->complex->prim_objs != NULL);
  @@ -49,19 +47,6 @@
     if (!w_current->DONT_REDRAW) {
       o_redraw(w_current, o_current->complex->prim_objs, TRUE);
     }
  -
  -  get_object_list_bounds(w_current, o_current->complex->prim_objs,
  -			 &left, &top, &right, &bottom);
  -  o_current->left   = left;
  -  o_current->top    = top;
  -  o_current->right  = right;
  -  o_current->bottom = bottom;
  -
  -  WORLDtoSCREEN(w_current,
  -                o_current->complex->x,
  -                o_current->complex->y,
  -                &o_current->complex->screen_x,
  -                &o_current->complex->screen_y);
   }
   
   /*! \todo Finish function documentation!!!
  @@ -271,6 +256,7 @@
     int diff_x, diff_y;
     int x, y;
     int rleft, rtop, rbottom, rright;
  +  int w_rleft, w_rtop, w_rbottom, w_rright;
     OBJECT *o_current;
     OBJECT *o_start;
     OBJECT *o_temp;
  @@ -338,10 +324,14 @@
   #if 0
         printf("inside draw bounding here\n");
   #endif
  -      get_object_glist_bounds(w_current,
  +      world_get_object_glist_bounds(w_current,
   			      w_current->page_current->
   			      complex_place_list,
  -			      &rleft, &rtop, &rright, &rbottom);
  +			      &w_rleft, &w_rtop, &w_rright, &w_rbottom);
  +
  +      WORLDtoSCREEN( w_current, w_rleft, w_rtop, &rleft, &rtop );
  +      WORLDtoSCREEN( w_current, w_rright, w_rbottom, &rright, &rbottom );
  +
         gdk_gc_set_foreground(
                               w_current->gc,
                               x_get_color(w_current->background_color));
  @@ -438,10 +428,14 @@
   #if 0
       printf("inside draw bounding here\n");
   #endif
  -    get_object_glist_bounds(w_current,
  +    world_get_object_glist_bounds(w_current,
   			    w_current->page_current->complex_place_list,
  -			    &rleft, &rtop,
  -			    &rright, &rbottom);
  +                                  &w_rleft, &w_rtop,
  +                                  &w_rright, &w_rbottom);
  +    
  +    WORLDtoSCREEN( w_current, w_rleft, w_rtop, &rleft, &rtop );
  +    WORLDtoSCREEN( w_current, w_rright, w_rbottom, &rright, &rbottom );
  +
       gdk_gc_set_foreground(
                             w_current->gc,
                             x_get_color(w_current->background_color));
  @@ -637,7 +631,7 @@
    */
   void o_complex_translate_all(TOPLEVEL *w_current, int offset)
   {
  -  int rleft, rtop, rright, rbottom;
  +  int w_rleft, w_rtop, w_rright, w_rbottom;
     OBJECT *o_current;
     int x, y;
   
  @@ -646,18 +640,15 @@
                    A_PAN_DONT_REDRAW);
     o_redraw_all(w_current);
   
  -  get_object_list_bounds(w_current, w_current->page_current->object_head,
  -			 &rleft,
  -			 &rtop,
  -			 &rright,
  -			 &rbottom);
  +  world_get_object_list_bounds(w_current, w_current->page_current->object_head,
  +                               &w_rleft,
  +                               &w_rtop,
  +                               &w_rright,
  +                               &w_rbottom);
   
     /*! \todo do we want snap grid here? */
  -  SCREENtoWORLD(w_current,
  -                fix_x(w_current, rleft  ),
  -                fix_y(w_current, rbottom),
  -                &x,
  -                &y);
  +  x = snap_grid( w_current, w_rleft );
  +  y = snap_grid( w_current, w_rbottom );
   
     o_current = w_current->page_current->object_head;
     while(o_current != NULL) {
  
  
  
  1.7       +18 -10    eda/geda/gaf/gschem/src/o_find.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_find.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_find.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- o_find.c	21 Dec 2006 20:40:37 -0000	1.6
  +++ o_find.c	17 Apr 2007 20:19:17 -0000	1.7
  @@ -40,6 +40,10 @@
   {
     OBJECT *o_current=NULL;
     gboolean object_found = FALSE;
  +  int w_x, w_y, w_slack;
  +
  +  SCREENtoWORLD( w_current, screen_x, screen_y, &w_x, &w_y );
  +  w_slack = WORLDabs( w_current, w_current->select_slack_pixels );
   
     if (w_current->page_current->object_lastplace == NULL) {
       o_current = w_current->page_current->object_head;
  @@ -49,9 +53,9 @@
   
     /* do first search */
     while (o_current != NULL) {
  -    if (inside_region(o_current->left, o_current->top,
  -                      o_current->right, o_current->bottom, 
  -                      screen_x, screen_y)) {
  +    if (inside_region(o_current->w_left - w_slack, o_current->w_top - w_slack,
  +                      o_current->w_right + w_slack, o_current->w_bottom + w_slack,
  +                      w_x, w_y)) {
         if (o_current->sel_func != NULL &&
   	  o_current->type != OBJ_HEAD &&
   	  (o_current->visibility == VISIBLE ||
  @@ -81,9 +85,9 @@
     o_current = w_current->page_current->object_head;
     while (o_current != NULL && 
            o_current != w_current->page_current->object_lastplace) {
  -    if (inside_region(o_current->left, o_current->top,
  -                      o_current->right, o_current->bottom, 
  -                      screen_x, screen_y)) {
  +    if (inside_region(o_current->w_left - w_slack, o_current->w_top - w_slack,
  +                      o_current->w_right + w_slack, o_current->w_bottom + w_slack,
  +                      w_x, w_y)) {
         
         if (o_current->sel_func != NULL &&
             o_current->type != OBJ_HEAD &&
  @@ -131,19 +135,23 @@
   {
     OBJECT *o_current=NULL;
     GList *s_current;
  +  int w_x, w_y, w_slack;
  +
  +  SCREENtoWORLD( w_current, screen_x, screen_y, &w_x, &w_y );
  +  w_slack = WORLDabs( w_current, w_current->select_slack_pixels );
   
     s_current = w_current->page_current->selection_list;
     /* do first search */
     while (s_current != NULL) {
       o_current = (OBJECT *) s_current->data;
  -    if (inside_region(o_current->left, o_current->top,
  -                      o_current->right, o_current->bottom, 
  -                      screen_x, screen_y)) {
  +    if (inside_region(o_current->w_left - w_slack, o_current->w_top - w_slack,
  +                      o_current->w_right + w_slack, o_current->w_bottom + w_slack,
  +                      w_x, w_y)) {
   
   #if DEBUG
         printf("o_find_selected_object:\n");
         printf("Object bounds:\n\tL: %i\tR: %i\n\tT: %i\tB: %i.\n",
  -	     o_current->left, o_current->right, o_current->top, o_current->bottom);
  +	     o_current->w_left, o_current->w_right, o_current->w_top, o_current->w_bottom);
         printf("Screen pointer at: (%i,%i)\n", screen_x, screen_y);
   #endif
         if (o_current->sel_func != NULL &&
  
  
  
  1.16      +0 -1      eda/geda/gaf/gschem/src/o_grips.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_grips.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_grips.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -b -r1.15 -r1.16
  --- o_grips.c	24 Feb 2007 18:43:14 -0000	1.15
  +++ o_grips.c	17 Apr 2007 20:19:17 -0000	1.16
  @@ -1226,7 +1226,6 @@
       o_net_modify(w_current, object, x, y, whichone_changing);
   
       s_conn_update_object(w_current, object);
  -    o_net_recalc(w_current, object);
   	  
       /* get the other connected objects and redraw them */
       connected_objects = s_conn_return_others(connected_objects,
  
  
  
  1.26      +0 -10     eda/geda/gaf/gschem/src/o_line.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_line.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_line.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -b -r1.25 -r1.26
  --- o_line.c	25 Feb 2007 02:15:56 -0000	1.25
  +++ o_line.c	17 Apr 2007 20:19:17 -0000	1.26
  @@ -60,16 +60,6 @@
       return;
     }
   
  -  /*
  -   * The function now recalculates the OBJECT as a line. It involves
  -   * calculating every single dimensions according to the zoom factor
  -   * and position, @dots{}
  -   * It also recalculates the bounding box of the object and check whether
  -   *  this object is visible or not. If not there is no reason to draw it !
  -   */
  -  /* goes before visible, clipfixme */
  -  o_line_recalc(w_current, o_current);
  -	
     if ( (w_current->DONT_REDRAW == 1) ||
          (!o_line_visible(w_current, o_current->line, &x1, &y1, &x2, &y2)) ) {
       return;
  
  
  
  1.44      +4 -0      eda/geda/gaf/gschem/src/o_misc.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_misc.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_misc.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -b -r1.43 -r1.44
  --- o_misc.c	16 Apr 2007 02:55:35 -0000	1.43
  +++ o_misc.c	17 Apr 2007 20:19:17 -0000	1.44
  @@ -1165,6 +1165,10 @@
       
     /* finally delete the temp list with the updated complex */
     s_delete_list_fromstart (w_current, tmp_list);
  +
  +  /* Recalculate the bounds of the object */
  +  o_complex_recalc(w_current, o_current);
  +
     /* reconnect, re-select and redraw */
     s_conn_update_complex (w_current, o_current->complex->prim_objs);
     o_selection_add (&(w_current->page_current->selection_list),
  
  
  
  1.32      +5 -10     eda/geda/gaf/gschem/src/o_move.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_move.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_move.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -b -r1.31 -r1.32
  --- o_move.c	24 Feb 2007 18:43:14 -0000	1.31
  +++ o_move.c	17 Apr 2007 20:19:17 -0000	1.32
  @@ -254,23 +254,18 @@
           object->complex->x = object->complex->x + diff_x;
           object->complex->y = object->complex->y + diff_y;
   
  -        WORLDtoSCREEN(w_current, object->complex->x,
  -                      object->complex->y,
  -                      &object->complex->screen_x,
  -                      &object->complex->screen_y);
  -
           o_move_end_lowlevel(w_current, object->complex->prim_objs,
                               COMPLEX, diff_x, diff_y,
                               &other_objects, &connected_objects);
   
   
  -        get_object_list_bounds(w_current, object->complex->prim_objs,
  +        world_get_object_list_bounds(w_current, object->complex->prim_objs,
   			       &left, &top, &right, &bottom);
   
  -        object->left = left;
  -        object->top = top;
  -        object->right = right;
  -        object->bottom = bottom;
  +        object->w_left = left;
  +        object->w_top = top;
  +        object->w_right = right;
  +        object->w_bottom = bottom;
   
           break;
       }
  
  
  
  1.33      +0 -2      eda/geda/gaf/gschem/src/o_net.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_net.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_net.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -b -r1.32 -r1.33
  --- o_net.c	24 Feb 2007 18:43:14 -0000	1.32
  +++ o_net.c	17 Apr 2007 20:19:17 -0000	1.33
  @@ -53,8 +53,6 @@
       return;
     }
   
  -  o_net_recalc(w_current, o_current);
  -
     /* reuse line's routine */
     if ( (w_current->DONT_REDRAW == 1) || 
          (!o_line_visible(w_current, o_current->line, &x1, &y1, &x2, &y2)) ) {
  
  
  
  1.12      +1 -11     eda/geda/gaf/gschem/src/o_picture.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_picture.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_picture.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -b -r1.11 -r1.12
  --- o_picture.c	24 Feb 2007 18:43:14 -0000	1.11
  +++ o_picture.c	17 Apr 2007 20:19:17 -0000	1.12
  @@ -348,20 +348,10 @@
       return;
     }
   
  -  /*
  -   * The function now recalculates the OBJECT as a picture. It involves
  -   * calculating every single dimensions according to the zoom factor the
  -   * position, @dots{}.
  -   * It also recalculates the bounding picture of the object and check
  -   * whether this object is visible or not. If not there is no reason to
  -   * draw it !
  -   */
  -  o_picture_recalc(w_current, o_current);
  -
     /* Get read to check for visibility of this line by using it's
      * bounding picture
      */
  -  world_get_picture_bounds(w_current, o_current->picture,
  +  world_get_picture_bounds(w_current, o_current,
                              &wleft, &wtop, &wright, &wbottom);
   	
     if (!visible(w_current, wleft, wtop, wright, wbottom)) {
  
  
  
  1.26      +0 -2      eda/geda/gaf/gschem/src/o_pin.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_pin.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_pin.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -b -r1.25 -r1.26
  --- o_pin.c	24 Feb 2007 18:43:14 -0000	1.25
  +++ o_pin.c	17 Apr 2007 20:19:17 -0000	1.26
  @@ -45,8 +45,6 @@
       return;
     }
   
  -  o_pin_recalc(w_current, o_current);
  -
     /* reuse line's routine */
     if ( (w_current->DONT_REDRAW == 1) ||
          (!o_line_visible(w_current, o_current->line, &x1, &y1, &x2, &y2)) ) {
  
  
  
  1.9       +9 -13     eda/geda/gaf/gschem/src/o_select.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_select.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_select.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- o_select.c	24 Feb 2007 18:43:14 -0000	1.8
  +++ o_select.c	17 Apr 2007 20:19:17 -0000	1.9
  @@ -414,17 +414,13 @@
       if (o_current->type != OBJ_HEAD && 
           (o_current->visibility == VISIBLE ||
           (o_current->visibility == INVISIBLE && w_current->show_hidden_text))) {
  -      if ( (o_current->left >= w_current->start_x && 
  -            o_current->top >= w_current->start_y) &&
  -           (o_current->left >= w_current->start_x && 
  -            o_current->bottom <= w_current->last_y) &&
  -           (o_current->right <= w_current->last_x && 
  -            o_current->top >= w_current->start_y ) &&
  -           (o_current->right <= w_current->last_x && 
  -            o_current->bottom <= w_current->last_y) ) {
   
  -        o_select_object(w_current, o_current, 	
  -                        MULTIPLE, count);
  +      if ( o_current->w_left   >= w_start_x &&
  +           o_current->w_right  <= w_last_x  &&
  +           o_current->w_top    >= w_last_y  &&
  +           o_current->w_bottom <= w_start_y ) {
  +
  +        o_select_object(w_current, o_current, MULTIPLE, count);
           count++;
         }
       }
  @@ -436,8 +432,8 @@
     /* key was pressed */
     if (count == 0 && !SHIFTKEY)  {
       o_select_run_hooks(w_current, NULL, 2);
  -    o_selection_unselect_list (w_current,
  -			       &(w_current->page_current->selection_list));
  +    o_selection_unselect_list( w_current,
  +                               &(w_current->page_current->selection_list) );
     }
     i_update_menus(w_current);
   }
  
  
  
  1.29      +23 -72    eda/geda/gaf/gschem/src/o_text.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_text.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_text.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -b -r1.28 -r1.29
  --- o_text.c	24 Feb 2007 18:43:14 -0000	1.28
  +++ o_text.c	17 Apr 2007 20:19:17 -0000	1.29
  @@ -62,18 +62,13 @@
     
     o_redraw(w_current, o_current->text->prim_objs, TRUE);
   
  -  get_object_list_bounds(w_current, o_current->text->prim_objs,
  +  world_get_object_list_bounds(w_current, o_current->text->prim_objs,
   			 &left, &top, &right, &bottom);
  -  o_current->left   = left;
  -  o_current->top    = top;
  -  o_current->right  = right;
  -  o_current->bottom = bottom;
  +  o_current->w_left   = left;
  +  o_current->w_top    = top;
  +  o_current->w_right  = right;
  +  o_current->w_bottom = bottom;
   
  -  WORLDtoSCREEN(w_current,
  -                o_current->text->x,
  -                o_current->text->y,
  -                &o_current->text->screen_x,
  -                &o_current->text->screen_y);
   }
   
   /*! \todo Finish function documentation!!!
  @@ -84,8 +79,6 @@
   void o_text_draw_rectangle(TOPLEVEL *w_current, OBJECT *o_current)
   {
     int left=0, right=0, top=0, bottom=0;
  -  int screen_x1, screen_y1;
  -  int width, height, dx=0, dy=0;
     GdkColor *color;
   
     if (o_current->visibility == INVISIBLE && w_current->show_hidden_text &&
  @@ -93,12 +86,12 @@
       o_text_recreate(w_current, o_current);
     }
     
  -  o_text_recalc(w_current, o_current);
  -
     /* text is too small so go through and draw a rectangle in
        it's place */
   	
  -  WORLDtoSCREEN( w_current, o_current->text->x, o_current->text->y, &screen_x1, &screen_y1 );
  +  /* NOTE THAT THE TOP AND BOTTOM ARE REVERSED THROUGHT THE WHOLE OF GEDA FOR WORLD COORDS */
  +  WORLDtoSCREEN( w_current, o_current->w_left, o_current->w_bottom, &left, &top );
  +  WORLDtoSCREEN( w_current, o_current->w_right, o_current->w_top, &right, &bottom );
   
     if (w_current->override_color != -1 ) {  /* Override */
       color = x_get_color(w_current->override_color);
  @@ -107,63 +100,21 @@
     }
     gdk_gc_set_foreground(w_current->gc, color);
   
  -
  -  width = SCREENabs(w_current, o_current->text->displayed_width);
  -  height = SCREENabs(w_current, o_current->text->displayed_height);
  -      
  -  switch(o_current->text->angle) {
  -    case(0):
  -      left = screen_x1+dx;
  -      top = screen_y1+dy-height;
  -      right = width;
  -      bottom = height;
  -      break;
  -	
  -    case(90):
  -      left = screen_x1+dx-height;
  -      top = screen_y1+dy-width;
  -      right = height;
  -      bottom = width;
  -      break;
  -	  
  -    case(180):
  -      left = screen_x1+dx-width;
  -      top = screen_y1+dy;
  -      right = width;
  -      bottom = height;
  -      break;
  -	
  -    case(270):
  -      left = screen_x1+dx;
  -      top = screen_y1+dy;
  -      right = height;
  -      bottom = width;
  -      break;
  -
  -    default:
  -      s_log_message(_("Tried to render text with an invalid angle: %d\n"),
  -                    o_current->text->angle); 
  -      return;
  -      break;
  -  }
  -
  -  /* The right, bottom variables are really just the width and height and */
  -  /* not the "right" or "bottom". */
     if (w_current->DONT_REDRAW == 0) {
  -    gdk_draw_rectangle(w_current->window,
  +    gdk_draw_rectangle( w_current->window,
   		       w_current->gc,
   		       FALSE,
   		       left, 
   		       top,
  -		       right,
  -		       bottom);
  -    gdk_draw_rectangle(w_current->backingstore,
  +                        right - left,
  +                        bottom - top );
  +    gdk_draw_rectangle( w_current->backingstore,
   		       w_current->gc,
   		       FALSE,
   		       left, 
   		       top,
  -		       right,
  -		       bottom);
  +                        right - left,
  +                        bottom - top );
     }
   
   #if 0 /* in prep for future performance enhancement */
  
  
  


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