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

gEDA-cvs: CVS update: o_arc_basic.c



  User: pcjc2   
  Date: 06/12/27 15:10:44

  Modified:    .        Tag: noscreen o_arc_basic.c o_box_basic.c
                        o_bus_basic.c o_circle_basic.c o_line_basic.c
                        o_net_basic.c o_picture.c o_pin_basic.c
                        o_text_basic.c
  Log:
  * include/prototype.h, src/o_arc_basic.c, src/o_box_basic.c,
  
    src/o_bus_basic.c, src/o_circle_basic.c, src/o_line_basic.c,
  
    src/o_net_basic.c, src/o_picture.c, src/o_pin_basic.c,
  
    src/o_text_basic.c: Removed o_..._rotate() functions unused
  
    since changing to world coordinates
  
  
  
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.31.2.2  +0 -37     eda/geda/gaf/libgeda/src/o_arc_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_arc_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_arc_basic.c,v
  retrieving revision 1.31.2.1
  retrieving revision 1.31.2.2
  diff -u -b -r1.31.2.1 -r1.31.2.2
  --- o_arc_basic.c	27 Dec 2006 19:48:11 -0000	1.31.2.1
  +++ o_arc_basic.c	27 Dec 2006 20:10:44 -0000	1.31.2.2
  @@ -460,43 +460,6 @@
   
   /*! \brief
    *  \par Function Description
  - *  This function applies a rotation of center (<B>centerx</B>,<B>centery</B>)
  - *  and angle <B>angle</B> to the arc object <B>*object</B>.
  - *  The coordinates of the rotation center are in screen units.
  - *  The angle is in degree.
  - *
  - *  The rotation is made with th <B>o_arc_rotate_world()</B> function
  - *  that perform a rotation of <B>angle</B> and center
  - *  (<B>world_centerx</B>,<B>world_centery</B>) in world unit.
  - *
  - *  \param [in] w_current  The TOPLEVEL object.
  - *  \param [in] centerx
  - *  \param [in] centery
  - *  \param [in] angle
  - *  \param [in] object
  - */
  -void o_arc_rotate(TOPLEVEL *w_current,
  -		  int centerx, int centery, int angle,
  -		  OBJECT *object)
  -{
  -  int world_centerx, world_centery;
  -
  -  /* convert the center of rotation to world unit */
  -  SCREENtoWORLD(w_current,
  -				centerx, centery,
  -                &world_centerx, &world_centery);
  -
  -  /* rotate the arc */
  -  o_arc_rotate_world(w_current,
  -					 world_centerx, world_centery, angle,
  -					 object);
  -
  -  /* screen coords and boundings are updated by _rotate_world() */
  -  
  -}                                   
  -
  -/*! \brief
  - *  \par Function Description
    *  This function rotates the world coordinates of an arc of an angle
    *  specified by <B>angle</B>. The center of the rotation is given by
    *  (<B>world_centerx</B>,<B>world_centery</B>).
  
  
  
  1.26.2.2  +0 -45     eda/geda/gaf/libgeda/src/o_box_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_box_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_box_basic.c,v
  retrieving revision 1.26.2.1
  retrieving revision 1.26.2.2
  diff -u -b -r1.26.2.1 -r1.26.2.2
  --- o_box_basic.c	27 Dec 2006 19:48:11 -0000	1.26.2.1
  +++ o_box_basic.c	27 Dec 2006 20:10:44 -0000	1.26.2.2
  @@ -531,51 +531,6 @@
     o_box_recalc(w_current, object);
   }
   
  -/*! \brief Rotate a BOX OBJECT.
  - *  \par Function Description
  - *  This function applies a rotation of center (<B>centerx</B>, <B>centery</B>) and
  - *  angle <B>angle</B> to the box object <B>*object</B>.
  - *  The coordinates of the rotation center are in screen units. 
  - *  <B>angle</B> must be a 90 degree multiple. If not, no rotation is applied.
  - *
  - *  The rotation is made with the #o_box_rotate_world() function that
  - *  perform a rotation of angle <B>angle</B> and center (<B>world_centerx</B>,
  - *  <B>world_centery</B>) in world unit.
  - *
  - *  \param [in]     w_current  The TOPLEVEL object.
  - *  \param [in]     centerx    Rotation center x coordinate in SCREEN units.
  - *  \param [in]     centery    Rotation center y coordinate in SCREEN units.
  - *  \param [in]     angle      Rotation angle in degrees (unused).
  - *  \param [in,out] object     BOX OBJECT to rotate.
  - *
  - *  \note
  - *  takes in screen coordinates for the centerx,y, and then does the rotate 
  - *  in world space
  - *  also ignores angle argument... for now, rotate only in 90 degree 
  - *  increments
  - *  fixed to 90 degrees... it's *not* general now
  - */
  -void o_box_rotate(TOPLEVEL *w_current,
  -		  int centerx, int centery, int angle,
  -		  OBJECT *object)
  -{
  -  int world_centerx, world_centery;
  -
  -  /* convert the center of rotation to world unit */
  -  SCREENtoWORLD(w_current,
  -				centerx, centery, 
  -                &world_centerx, &world_centery);  
  -
  -  /* rotate the box */
  -  /* the check of the rotation angle is in o_box_rotate_world() */
  -  o_box_rotate_world(w_current,
  -					 world_centerx, world_centery, angle,
  -					 object);
  -
  -  /* screen coords and boundings are updated by _rotate_world() */
  -  
  -}
  -
   /*! \brief Rotate BOX OBJECT using WORLD coordinates. 
    *  \par Function Description
    *  The function #o_box_rotate_world() rotate the box described by
  
  
  
  1.17.2.2  +0 -44     eda/geda/gaf/libgeda/src/o_bus_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_bus_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_bus_basic.c,v
  retrieving revision 1.17.2.1
  retrieving revision 1.17.2.2
  diff -u -b -r1.17.2.1 -r1.17.2.2
  --- o_bus_basic.c	27 Dec 2006 19:48:11 -0000	1.17.2.1
  +++ o_bus_basic.c	27 Dec 2006 20:10:44 -0000	1.17.2.2
  @@ -526,50 +526,6 @@
    * \par Function Description
    *
    */
  -/* takes in screen coordinates for the centerx,y, and then does the rotate 
  - * in world space */
  -/* also ignores angle argument... for now, rotate only in 90 degree 
  - * increments */
  -/* fully functional */
  -void o_bus_rotate(TOPLEVEL *w_current, int centerx, int centery, int angle,
  -		  OBJECT *object)
  -{
  -  int world_centerx, world_centery;
  -  int newx, newy;
  -
  -  SCREENtoWORLD(w_current, centerx, centery, 
  -                &world_centerx,
  -                &world_centery);  
  -
  -  /* change the bus ripper orientation when the rotation is 90 degrees */
  -  /* yes it's okay to use o_net_orientation */
  -  if (o_net_orientation(object) == VERTICAL && angle == 90) {
  -    object->bus_ripper_direction = -object->bus_ripper_direction;
  -  }
  -  
  -  /* translate object to origin */
  -  o_bus_translate_world(w_current, -world_centerx, -world_centery, object);
  -
  -  rotate_point_90(object->line->x[0], object->line->y[0], angle,
  -                  &newx, &newy);
  -
  -  object->line->x[0] = newx;
  -  object->line->y[0] = newy;
  -
  -  rotate_point_90(object->line->x[1], object->line->y[1], angle,
  -                  &newx, &newy);
  -
  -  object->line->x[1] = newx;
  -  object->line->y[1] = newy;
  -
  -  o_bus_translate_world(w_current, world_centerx, world_centery, object);
  -
  -}
  -
  -/* \brief
  - * \par Function Description
  - *
  - */
   void o_bus_rotate_world(TOPLEVEL *w_current, 
   			int world_centerx, int world_centery, int angle,
   			OBJECT *object)
  
  
  
  1.27.2.2  +0 -39     eda/geda/gaf/libgeda/src/o_circle_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_circle_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_circle_basic.c,v
  retrieving revision 1.27.2.1
  retrieving revision 1.27.2.2
  diff -u -b -r1.27.2.1 -r1.27.2.2
  --- o_circle_basic.c	27 Dec 2006 19:48:11 -0000	1.27.2.1
  +++ o_circle_basic.c	27 Dec 2006 20:10:44 -0000	1.27.2.2
  @@ -480,45 +480,6 @@
     
   }
   
  -/*! \brief Rotate a Circle OBJECT.
  - *  \par Function Description
  - *  The function #o_circle_rotate_world() rotate the circle described by
  - *  <B>*object</B> around the (<B>world_centerx</B>,<B>world_centery</B>) point by
  - *  angle <B>angle</B> degrees.
  - *  The center of rotation is in world unit.
  - *
  - *  \param [in]     w_current  The TOPLEVEL object.
  - *  \param [in]     centerx    Rotation center x coordinate in SCREEN units.
  - *  \param [in]     centery    Rotation center y coordinate in SCREEN units.
  - *  \param [in]     angle      Rotation angle in degrees (unused).
  - *  \param [in,out] object     Circle OBJECT to rotate.
  - *
  - *  \note
  - *  takes in screen coordinates for the centerx,y, and then does the rotate 
  - *  in world space
  - *  also ignores angle argument... for now, rotate only in 90 degree 
  - *  increments
  - */
  -void o_circle_rotate(TOPLEVEL *w_current,
  -		     int centerx, int centery, int angle,
  -		     OBJECT *object)
  -{
  -  int world_centerx, world_centery;
  -
  -  /* convert the center of rotation to world unit */
  -  SCREENtoWORLD(w_current,
  -				centerx, centery, 
  -                &world_centerx, &world_centery);  
  -
  -  /* rotate the circle */
  -  o_circle_rotate_world(w_current,
  -			world_centerx, world_centery, angle,
  -			object);
  -  
  -  /* screen coords and boundings are updated by _rotate_world() */
  -  
  -}
  -
   /*! \brief Rotate Circle OBJECT using WORLD coordinates. 
    *  \par Function Description
    *  The function #o_circle_rotate_world() rotate the circle described by
  
  
  
  1.26.2.2  +0 -41     eda/geda/gaf/libgeda/src/o_line_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_line_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_line_basic.c,v
  retrieving revision 1.26.2.1
  retrieving revision 1.26.2.2
  diff -u -b -r1.26.2.1 -r1.26.2.2
  --- o_line_basic.c	27 Dec 2006 19:48:11 -0000	1.26.2.1
  +++ o_line_basic.c	27 Dec 2006 20:10:44 -0000	1.26.2.2
  @@ -480,47 +480,6 @@
       
   }
   
  -/*! \brief Rotate a line OBJECT.
  - *  \par Function Description
  - *  This function applies a rotation of center (<B>centerx</B>,<B>centery</B>)
  - *  and angle <B>angle</B> to the line object <B>*object</B>.
  - *  The coordinates of the rotation center are in screen units.
  - *  <B>angle</B> mst be a 90 degree multiple. If not, no rotation is applied.
  - *
  - *  The rotation is made by the #o_line_rotate_world() function
  - *  that perform a rotation of angle <B>angle</B> and center
  - *  (<B>world_centerx</B>,<B>world_centery</B>) in world unit.
  - *
  - *  \param [in]     w_current  The TOPLEVEL object.
  - *  \param [in]     centerx    Rotation center x coordinate in SCREEN units.
  - *  \param [in]     centery    Rotation center y coordinate in SCREEN units.
  - *  \param [in]     angle      Rotation angle in degrees (unused).
  - *  \param [in,out] object     Line OBJECT to rotate.
  - *
  - *  \note
  - *  takes in screen coordinates for the centerx,y, and then does the rotate 
  - *  in world space
  - *  also ignores angle argument... for now, rotate only in 90 degree 
  - *  increments
  - */
  -void o_line_rotate(TOPLEVEL *w_current, int centerx, int centery, int angle,
  -		   OBJECT *object)
  -{
  -  int world_centerx, world_centery;
  -
  -  /* convert the center of rotation to world unit */
  -  SCREENtoWORLD(w_current, centerx, centery, 
  -                &world_centerx,
  -                &world_centery);  
  -
  -  /* rotate the line */
  -  /* the check on the rotation angle is in o_line_rotate_world() */
  -  o_line_rotate_world(w_current,
  -					  world_centerx, world_centery, angle,
  -					  object);
  -  
  -}
  -
   /*! \brief Rotate Line OBJECT using WORLD coordinates. 
    *  \par Function Description 
    *  This function rotates the line described by
  
  
  
  1.34.2.2  +0 -38     eda/geda/gaf/libgeda/src/o_net_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_net_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_net_basic.c,v
  retrieving revision 1.34.2.1
  retrieving revision 1.34.2.2
  diff -u -b -r1.34.2.1 -r1.34.2.2
  --- o_net_basic.c	27 Dec 2006 19:48:11 -0000	1.34.2.1
  +++ o_net_basic.c	27 Dec 2006 20:10:44 -0000	1.34.2.2
  @@ -563,44 +563,6 @@
    *  \brief
    *  \par Function Description
    *
  - * takes in screen coordinates for the centerx,y, and then does the rotate 
  - * in world space
  - * also ignores angle argument... for now, rotate only in 90 degree 
  - * increments
  - * fully functional
  - */
  -void o_net_rotate(TOPLEVEL *w_current, int centerx, int centery, int angle,
  -		  OBJECT *object)
  -{
  -  int world_centerx, world_centery;
  -  int newx, newy;
  -
  -  SCREENtoWORLD(w_current, centerx, centery,
  -                &world_centerx, &world_centery);
  -
  -  /* translate object to origin */
  -  o_net_translate_world(w_current, -world_centerx, -world_centery,
  -                        object);
  -
  -  rotate_point_90(object->line->x[0], object->line->y[0], angle,
  -                  &newx, &newy);
  -
  -  object->line->x[0] = newx;
  -  object->line->y[0] = newy;
  -
  -  rotate_point_90(object->line->x[1], object->line->y[1], angle,
  -                  &newx, &newy);
  -
  -  object->line->x[1] = newx;
  -  object->line->y[1] = newy;
  -
  -  o_net_translate_world(w_current, world_centerx, world_centery, object);
  -}
  -
  -/*! \todo Finish function documentation!!!
  - *  \brief
  - *  \par Function Description
  - *
    *
    */
   void o_net_rotate_world(TOPLEVEL *w_current,
  
  
  
  1.5.2.2   +0 -45     eda/geda/gaf/libgeda/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/libgeda/src/o_picture.c,v
  retrieving revision 1.5.2.1
  retrieving revision 1.5.2.2
  diff -u -b -r1.5.2.1 -r1.5.2.2
  --- o_picture.c	27 Dec 2006 19:48:11 -0000	1.5.2.1
  +++ o_picture.c	27 Dec 2006 20:10:44 -0000	1.5.2.2
  @@ -649,51 +649,6 @@
     o_picture_recalc(w_current, object);
   }
   
  -/*! \brief Rotate a picture OBJECT.
  - *  \par Function Description
  - *  This function applies a rotation of center (<B>centerx</B>, <B>centery</B>)
  - *  and angle <B>angle</B> to the picture object <B>*object</B>.
  - *  The coordinates of the rotation center are in screen units. 
  - *  <B>angle</B> must be a 90 degree multiple. If not, no rotation is applied.
  - *
  - *  The rotation is made with the #o_picture_rotate_world() function
  - *  that perform a rotation of angle <B>angle</B> and center
  - *  (<B>world_centerx</B>, <B>world_centery</B>) in world unit.
  - *
  - *  \param [in]     w_current  The TOPLEVEL object.
  - *  \param [in]     centerx    Rotation center x coordinate in SCREEN units.
  - *  \param [in]     centery    Rotation center y coordinate in SCREEN units.
  - *  \param [in]     angle      Rotation angle in degrees (unused).
  - *  \param [in,out] object     Picture OBJECT to rotate.
  - *
  - *  \note
  - *  takes in screen coordinates for the centerx,y, and then does the rotate 
  - *  in world space
  - *  also ignores angle argument... for now, rotate only in 90 degree 
  - *  increments
  - *  fixed to 90 degrees... it's *not* general now
  - */
  -void o_picture_rotate(TOPLEVEL *w_current,
  -		      int centerx, int centery, int angle,
  -		      OBJECT *object)
  -{
  -  int world_centerx, world_centery;
  -
  -  /* convert the center of rotation to world unit */
  -  SCREENtoWORLD(w_current,
  -				centerx, centery, 
  -                &world_centerx, &world_centery);  
  -
  -  /* rotate the picture */
  -  /* the check of the rotation angle is in o_picture_rotate_world() */
  -  o_picture_rotate_world(w_current,
  -					 world_centerx, world_centery, angle,
  -					 object);
  -
  -  /* screen coords and boundings are updated by _rotate_world() */
  -  
  -}
  -
   /*! \brief Rotate picture OBJECT using WORLD coordinates.
    *  \par Function Description 
    *  This function rotates the picture described by <B>*object</B> around
  
  
  
  1.24.2.2  +0 -33     eda/geda/gaf/libgeda/src/o_pin_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_pin_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_pin_basic.c,v
  retrieving revision 1.24.2.1
  retrieving revision 1.24.2.2
  diff -u -b -r1.24.2.1 -r1.24.2.2
  --- o_pin_basic.c	27 Dec 2006 19:48:11 -0000	1.24.2.1
  +++ o_pin_basic.c	27 Dec 2006 20:10:44 -0000	1.24.2.2
  @@ -529,39 +529,6 @@
    *  \par Function Description
    *
    */
  -void o_pin_rotate(TOPLEVEL *w_current, int centerx, int centery, int angle,
  -		  OBJECT *object)
  -{
  -  int world_centerx, world_centery;
  -  int newx, newy;
  -
  -  SCREENtoWORLD(w_current, centerx, centery, 
  -                &world_centerx,
  -                &world_centery);  
  -
  -  /* translate object to origin */
  -  o_pin_translate_world(w_current, -world_centerx, -world_centery, object);
  -
  -  rotate_point_90(object->line->x[0], object->line->y[0], angle,
  -                  &newx, &newy);
  -
  -  object->line->x[0] = newx;
  -  object->line->y[0] = newy;
  -
  -  rotate_point_90(object->line->x[1], object->line->y[1], angle,
  -                  &newx, &newy);
  -
  -  object->line->x[1] = newx;
  -  object->line->y[1] = newy;
  -
  -  o_pin_translate_world(w_current, world_centerx, world_centery, object);
  -}
  -
  -/*! \todo Finish function documentation!!!
  - *  \brief
  - *  \par Function Description
  - *
  - */
   void o_pin_rotate_world(TOPLEVEL *w_current, int world_centerx, 
   			int world_centery, int angle,
   			OBJECT *object)
  
  
  
  1.25.2.2  +0 -31     eda/geda/gaf/libgeda/src/o_text_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_text_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_text_basic.c,v
  retrieving revision 1.25.2.1
  retrieving revision 1.25.2.2
  diff -u -b -r1.25.2.1 -r1.25.2.2
  --- o_text_basic.c	27 Dec 2006 19:48:11 -0000	1.25.2.1
  +++ o_text_basic.c	27 Dec 2006 20:10:44 -0000	1.25.2.2
  @@ -1829,37 +1829,6 @@
     o_text_recreate(w_current, object);
   }
   
  -void o_text_rotate(TOPLEVEL *w_current, int centerx, int centery, int angle,
  -		   int angle_change, OBJECT *object)
  -{
  -  int newx, newy;
  -  int origx, origy;
  -  int world_centerx, world_centery;
  -  int x, y;
  -	
  -  SCREENtoWORLD(w_current, centerx, centery,
  -                &world_centerx,
  -                &world_centery);
  -	
  -
  -  origx = object->text->x;
  -  origy = object->text->y;
  -
  -  object->text->angle = angle;
  -
  -  x = origx + (-world_centerx);
  -  y = origy + (-world_centery);
  -	
  -  rotate_point_90(x, y, angle_change, &newx, &newy);
  -
  -  x = newx + (world_centerx);
  -  y = newy + (world_centery);
  -	
  -  o_text_translate_world(w_current, x-object->text->x, y-object->text->y, object);
  -
  -  o_text_recreate(w_current, object);
  -}
  -
   #if 0 /* code which is no longer needed, replaced by new functions below */
   /*! \todo Finish function documentation!!!
    *  \brief
  
  
  


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