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

gEDA-cvs: branch: master updated (1.4.0-20080127-14-gd68fe13)



The branch, master has been updated
       via  d68fe1307f4f98aa51844bbf378d5d0a9467b8b2 (commit)
      from  4b53eba9204af5eee37c308f23d396df21b2edad (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
=========

 libgeda/src/o_arc_basic.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)


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

commit d68fe1307f4f98aa51844bbf378d5d0a9467b8b2
Author: Werner Hoch <werner.ho@xxxxxx>
Date:   Sun Feb 24 10:24:13 2008 +0100

    libgeda: bugfix for bounding box calculation of mirrored arcs
    
    A mirrored arc has a negative sweep angle (called end_angle).
    This wasn't properly catched in the bounding box calculation.
    Bug reported by Kai-Martin Knaak on geda-user mailing list.

:100644 100644 06aa8be... 0055bee... M	libgeda/src/o_arc_basic.c

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

commit d68fe1307f4f98aa51844bbf378d5d0a9467b8b2
Author: Werner Hoch <werner.ho@xxxxxx>
Date:   Sun Feb 24 10:24:13 2008 +0100

    libgeda: bugfix for bounding box calculation of mirrored arcs
    
    A mirrored arc has a negative sweep angle (called end_angle).
    This wasn't properly catched in the bounding box calculation.
    Bug reported by Kai-Martin Knaak on geda-user mailing list.

diff --git a/libgeda/src/o_arc_basic.c b/libgeda/src/o_arc_basic.c
index 06aa8be..0055bee 100644
--- a/libgeda/src/o_arc_basic.c
+++ b/libgeda/src/o_arc_basic.c
@@ -566,7 +566,15 @@ void world_get_arc_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left,
    *  The previous rectangle is extended to the final one
    *  by checking whether the arc is over a main axis (vertical or horizontal).
    *  If so, the rectangle is extended in these directions.
+   *
+   *  In the mirror mode, the sweep angle is negativ. To get a
+   *  CCW arc before this calculation we have to move the 
+   *  start angle to the end angle and reverse the sweep angle.
    */
+  if (end_angle < 0) {
+    start_angle = (start_angle + end_angle + 360) % 360;
+    end_angle = -end_angle;
+  }
   angle = ((int) (start_angle / 90)) * 90;
   for(i = 0; i < 4; i++) {
     angle = angle + 90;




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