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

gEDA-cvs: CVS update: m_basic.c



  User: pcjc2   
  Date: 07/04/21 09:09:04

  Modified:    .        m_basic.c
  Log:
  Fix visibility test in visible(..) for the case when the 
  
  object completely surrounds the screen clipping region.
  
  
  
  
  Revision  Changes    Path
  1.14      +14 -10    eda/geda/gaf/libgeda/src/m_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: m_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/m_basic.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- m_basic.c	24 Feb 2007 18:43:16 -0000	1.13
  +++ m_basic.c	21 Apr 2007 13:09:03 -0000	1.14
  @@ -812,6 +812,10 @@
    *  \par Function Description
    *  This function checks if a given bounding box is visible on the screen.
    *
  + *  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.
  + *
    *  \param [in] w_current  The TOPLEVEL object.
    *  \param [in] wleft      Left coordinate of the bounding box.
    *  \param [in] wtop       Top coordinate of the bounding box.
  @@ -871,15 +875,15 @@
     printf("%d %d %d\n", wtop, w_current->page_current->bottom, wbottom);
   #endif
   
  -  /* now check to see if bounding box encompasses the entire viewport */
  +  /*
  +   * now check to see if bounding box encompasses the entire viewport.
  +   * We only need to test if one point on the screen clipping boundary
  +   * is indide the bounding box of the object.
  +   */
     if (w_current->page_current->left >= wleft && 
         w_current->page_current->left <= wright  &&
  -      w_current->page_current->top <= wtop &&
  -      w_current->page_current->top >= wbottom ) {
  -    /*w_current->page_current->right >= wleft &&
  -      w_current->page_current->right <= wright &&
  -      w_current->page_current->bottom <= wtop &&
  -      w_current->page_current->bottom >= wbottom ) {*/
  +      w_current->page_current->top >= wtop    &&
  +      w_current->page_current->top <= wbottom ) {
       visible = 1;
     } 
   
  
  
  


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