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

gEDA-cvs: CVS update: o_arc.c



  User: cnieves 
  Date: 06/10/21 09:32:54

  Modified:    .        o_arc.c o_box.c o_bus.c o_circle.c o_cue.c
                        o_grips.c o_line.c o_net.c o_picture.c o_pin.c
                        o_text.c
  Log:
  Don't draw objects if w_current->DONT_REDRAW is 1.
  
  
  
  
  Revision  Changes    Path
  1.24      +2 -1      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.23
  retrieving revision 1.24
  diff -u -b -r1.23 -r1.24
  --- o_arc.c	14 Jul 2006 02:23:54 -0000	1.23
  +++ o_arc.c	21 Oct 2006 13:32:54 -0000	1.24
  @@ -82,7 +82,8 @@
     world_get_arc_bounds(w_current, o_current,
                          &wleft, &wtop, &wright, &wbottom);
   
  -  if (!visible(w_current, wleft, wtop, wright, wbottom)) {
  +  if ( (w_current->DONT_REDRAW == 1) ||
  +       (!visible(w_current, wleft, wtop, wright, wbottom)) ) {
       return;
     }
   
  
  
  
  1.22      +2 -1      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.21
  retrieving revision 1.22
  diff -u -b -r1.21 -r1.22
  --- o_box.c	14 Jul 2006 02:23:54 -0000	1.21
  +++ o_box.c	21 Oct 2006 13:32:54 -0000	1.22
  @@ -80,7 +80,8 @@
     world_get_box_bounds(w_current, o_current->box,
                          &wleft, &wtop, &wright, &wbottom);
   	
  -  if (!visible(w_current, wleft, wtop, wright, wbottom)) {
  +  if ( (w_current->DONT_REDRAW == 1) ||
  +       (!visible(w_current, wleft, wtop, wright, wbottom)) ) {
       return;
     }
   	
  
  
  
  1.20      +2 -1      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.19
  retrieving revision 1.20
  diff -u -b -r1.19 -r1.20
  --- o_bus.c	14 Jul 2006 02:23:54 -0000	1.19
  +++ o_bus.c	21 Oct 2006 13:32:54 -0000	1.20
  @@ -50,7 +50,8 @@
     o_bus_recalc(w_current, o_current);
   
     /* reuse line's routine */
  -  if (!o_line_visible(w_current, o_current->line, &x1, &y1, &x2, &y2)) {
  +  if ( (w_current->DONT_REDRAW == 1) || 
  +       (!o_line_visible(w_current, o_current->line, &x1, &y1, &x2, &y2)) ) {
       return;
     }
   
  
  
  
  1.20      +2 -1      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.19
  retrieving revision 1.20
  diff -u -b -r1.19 -r1.20
  --- o_circle.c	14 Jul 2006 02:23:54 -0000	1.19
  +++ o_circle.c	21 Oct 2006 13:32:54 -0000	1.20
  @@ -79,7 +79,8 @@
     world_get_circle_bounds(w_current, o_current->circle,
                             &wleft, &wtop, &wright, &wbottom);
   	
  -  if (!visible(w_current, wleft, wtop, wright, wbottom)) {
  +  if ( (w_current->DONT_REDRAW == 1) || 
  +       (!visible(w_current, wleft, wtop, wright, wbottom)) ) {
       return;
     }
   	
  
  
  
  1.5       +96 -87    eda/geda/gaf/gschem/src/o_cue.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_cue.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_cue.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- o_cue.c	14 Jul 2006 02:23:55 -0000	1.4
  +++ o_cue.c	21 Oct 2006 13:32:54 -0000	1.5
  @@ -143,6 +143,7 @@
       case(CONN_ENDPOINT):
         if (object->type == OBJ_NET) { /* only nets have these cues */
           if (count < 1) { /* Didn't find anything connected there */
  +	  if (w_current->DONT_REDRAW == 0) {
             gdk_draw_rectangle(w_current->window,
                                w_current->gc, TRUE,
                                screen_x - size,
  @@ -155,6 +156,7 @@
                                screen_y - size,
                                x2size,
                                x2size);
  +	  }
           
           } else if (count >= 2) {
             /* draw circle */
  @@ -164,7 +166,7 @@
             } else {
               size = SCREENabs(w_current, CUE_CIRCLE_LARGE_SIZE);
             }
  -          
  +	  if (w_current->DONT_REDRAW == 0) {
             gdk_draw_arc(w_current->window, w_current->gc,
                          TRUE,
                          screen_x - size / 2,
  @@ -175,7 +177,7 @@
                          screen_x - size / 2,
                          screen_y - size / 2,
                          size, size, 0, FULL_CIRCLE);
  -
  +	  }
           }
         } else if (object->type == OBJ_PIN) {
           /* Didn't find anything connected there */
  @@ -191,6 +193,7 @@
                                          GDK_JOIN_MITER);
             }
   
  +	  if (w_current->DONT_REDRAW == 0) {
             if (object->line->y[whichone] == object->line->y[otherone]) {
               /* horizontal line */
               if (object->line->x[whichone] <= object->line->x[otherone]) {
  @@ -221,6 +224,7 @@
               /* angled line */
               /* not supporting rendering of que for angled pin for now. hack */
             }
  +	  }
   
             if (w_current->pin_style == THICK ) {
               gdk_gc_set_line_attributes(w_current->gc, 0,
  @@ -241,6 +245,7 @@
           size = SCREENabs(w_current, CUE_CIRCLE_LARGE_SIZE);
         }
   
  +      if (w_current->DONT_REDRAW == 0) {
         gdk_draw_arc(w_current->window, w_current->gc,
                      TRUE,
                      screen_x - size / 2,
  @@ -251,7 +256,7 @@
                      screen_x - size / 2,
                      screen_y - size / 2,
                      size, size, 0, FULL_CIRCLE);
  -
  +      }
         break;
   
         /* here is where you draw bus rippers */
  @@ -284,6 +289,7 @@
    
     WORLDtoSCREEN(w_current, x, y, &screen_x, &screen_y);
     
  +  if (w_current->DONT_REDRAW == 0) {
     gdk_draw_rectangle(w_current->window,
                        w_current->gc, TRUE,
                        screen_x - size,
  @@ -296,6 +302,7 @@
                        screen_y - size,
                        x2size,
                        x2size);
  +  }
   
   }
   
  @@ -342,6 +349,7 @@
             size = SCREENabs(w_current, CUE_CIRCLE_LARGE_SIZE);
           }
   
  +	if (w_current->DONT_REDRAW == 0) {
           gdk_draw_arc(w_current->window, w_current->gc,
                        TRUE,
                        screen_x - size / 2,
  @@ -352,6 +360,7 @@
                        screen_x - size / 2,
                        screen_y - size / 2,
                        size, size, 0, FULL_CIRCLE);
  +	}
           break;
       }
      
  
  
  
  1.11      +8 -6      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.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- o_grips.c	6 Aug 2006 16:45:29 -0000	1.10
  +++ o_grips.c	21 Oct 2006 13:32:54 -0000	1.11
  @@ -1775,12 +1775,14 @@
      * A grip is a hollow square centered at (<B>x</B>,<B>y</B>) with a
      * width/height of <B>x2size</B>.
      */
  +  if (w_current->DONT_REDRAW == 0) {
     /* draw the grip in window */
     gdk_draw_rectangle(w_current->window, w_current->gc, FALSE,
   		     x - size, y - size, x2size, x2size);
     /* draw the grip in backingstore */
     gdk_draw_rectangle(w_current->backingstore, w_current->gc, FALSE,
   		     x - size, y - size, x2size, x2size);
  +  }
   }
   
   /*! \brief Erase grip centered at <B>x</B>,<B>y</B>
  
  
  
  1.21      +2 -1      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.20
  retrieving revision 1.21
  diff -u -b -r1.20 -r1.21
  --- o_line.c	14 Jul 2006 02:23:55 -0000	1.20
  +++ o_line.c	21 Oct 2006 13:32:54 -0000	1.21
  @@ -65,7 +65,8 @@
     /* goes before visible, clipfixme */
     o_line_recalc(w_current, o_current);
   	
  -  if (!o_line_visible(w_current, o_current->line, &x1, &y1, &x2, &y2)) {
  +  if ( (w_current->DONT_REDRAW == 1) ||
  +       (!o_line_visible(w_current, o_current->line, &x1, &y1, &x2, &y2)) ) {
       return;
     }
   	
  
  
  
  1.28      +2 -1      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.27
  retrieving revision 1.28
  diff -u -b -r1.27 -r1.28
  --- o_net.c	15 Jul 2006 18:51:41 -0000	1.27
  +++ o_net.c	21 Oct 2006 13:32:54 -0000	1.28
  @@ -56,7 +56,8 @@
     o_net_recalc(w_current, o_current);
   
     /* reuse line's routine */
  -  if (!o_line_visible(w_current, o_current->line, &x1, &y1, &x2, &y2)) {
  +  if ( (w_current->DONT_REDRAW == 1) || 
  +       (!o_line_visible(w_current, o_current->line, &x1, &y1, &x2, &y2)) ) {
       return;
     }
   
  
  
  
  1.5       +37 -29    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.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- o_picture.c	6 Aug 2006 16:45:29 -0000	1.4
  +++ o_picture.c	21 Oct 2006 13:32:54 -0000	1.5
  @@ -482,6 +482,7 @@
         return;
       }
   
  +    if (w_current->DONT_REDRAW == 0) {
       gdk_draw_pixbuf(w_current->window, w_current->gc,
   		    o_current->picture->displayed_picture, 
   		    0, 0, o_current->picture->screen_upper_x,
  @@ -493,7 +494,9 @@
   		    o_current->picture->screen_upper_y, 
   		    -1, -1, GDK_RGB_DITHER_NONE, 0, 0);
     }
  +  }
     else {
  +    if (w_current->DONT_REDRAW == 0) {
       /* Erase the picture, drawing a rectangle with the background color */
       gdk_gc_set_foreground(w_current->gc, 
   			  x_get_color(w_current->background_color));
  @@ -512,18 +515,23 @@
   		       abs(o_current->picture->screen_lower_y - 
   			   o_current->picture->screen_upper_y));
     }
  +  }
   
     /* Grip specific stuff */
     if ((o_current->draw_grips == TRUE) && (w_current->draw_grips == TRUE)) {
         if (!o_current->selected) {
   	/* object is no more selected, erase the grips */
   	o_current->draw_grips = FALSE;
  +	if (w_current->DONT_REDRAW == 0) {
   	o_picture_erase_grips(w_current, o_current); 
  +	}
         } else {
   	/* object is selected, draw the grips on the picture */
  +	if (w_current->DONT_REDRAW == 0) {
   	o_picture_draw_grips(w_current, o_current); 
         }
     }
  +  }
   }
   
   /*! \brief Draw grip marks on picture.
  
  
  
  1.23      +15 -10    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.22
  retrieving revision 1.23
  diff -u -b -r1.22 -r1.23
  --- o_pin.c	14 Jul 2006 02:23:55 -0000	1.22
  +++ o_pin.c	21 Oct 2006 13:32:54 -0000	1.23
  @@ -48,7 +48,8 @@
     o_pin_recalc(w_current, o_current);
   
     /* reuse line's routine */
  -  if (!o_line_visible(w_current, o_current->line, &x1, &y1, &x2, &y2)) {
  +  if ( (w_current->DONT_REDRAW == 1) ||
  +       (!o_line_visible(w_current, o_current->line, &x1, &y1, &x2, &y2)) ) {
       return;
     }
   
  @@ -66,17 +67,21 @@
     if (w_current->override_color != -1 ) {
       gdk_gc_set_foreground(w_current->gc,
   			  x_get_color(w_current->override_color));
  +    if (w_current->DONT_REDRAW == 0) {
       gdk_draw_line(w_current->window, w_current->gc,
                     x1, y1, x2, y2);
       gdk_draw_line(w_current->backingstore, w_current->gc,
                     x1, y1, x2, y2);
  +    }
     } else {
  +    if (w_current->DONT_REDRAW == 0) {
       gdk_gc_set_foreground(w_current->gc, x_get_color(o_current->color));
       gdk_draw_line(w_current->window, w_current->gc,
                     x1, y1, x2, y2);
       gdk_draw_line(w_current->backingstore, w_current->gc,
                     x1, y1, x2, y2);
     }
  +  }
   
     /* draw the cue directly */
     o_cue_draw_lowlevel(w_current, o_current, o_current->whichend);
  
  
  
  1.20      +74 -69    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.19
  retrieving revision 1.20
  diff -u -b -r1.19 -r1.20
  --- o_text.c	21 Oct 2006 13:27:48 -0000	1.19
  +++ o_text.c	21 Oct 2006 13:32:54 -0000	1.20
  @@ -156,6 +156,7 @@
   
     /* 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,
                        w_current->gc,
                        FALSE,
  @@ -170,6 +171,7 @@
                        top,
                        right,
                        bottom);
  +  }
   
   #if 0 /* in prep for future performance enhancement */
     right = right+left;
  @@ -239,6 +241,7 @@
         small_dist = SCREENabs(w_current, 20);
         screen_x1 = o_current->text->screen_x + offset;
         screen_y1 = o_current->text->screen_y + offset;
  +      if (w_current->DONT_REDRAW == 0) {
         /* Top part of the I */
         gdk_draw_line(w_current->window, w_current->gc,
   		    screen_x1,
  @@ -272,7 +275,7 @@
   		    screen_y1+small_dist,
   		    screen_x1+small_dist,
   		    screen_y1+small_dist);
  -      
  +      }	
       }
       
     } else {
  @@ -308,6 +311,7 @@
                             x_get_color(w_current->lock_color));
     }
   
  +  if (w_current->DONT_REDRAW == 0) {
     gdk_draw_line(w_current->window, w_current->gc, 
                   screen_x1-small_dist, 
                   screen_y1+small_dist, 
  @@ -329,6 +333,7 @@
                   screen_y1+small_dist, 
                   screen_x1-small_dist, 
                   screen_y1-small_dist);
  +  }
   }
   
   /*! \todo Finish function documentation!!!
  
  
  


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