gEDA-dev: Broken libgd support in gschem (arc drawing) PATCH
Peter Clifton
pcjc2 at cam.ac.uk
Sat Dec 30 13:59:27 EST 2006
I've discovered that after enabling libgd, it draws the arcs upside-down
with respect to what gschem does.
It appears that libgd has angles starting with 0 degrees on the +ve X
axis (rightmost), and +ve clockwise.
gschem appears to have 0 degrees on the +ve X axis (rightmost), and +ve
ANTI-clockwise (which is more what an electrical engineer might
expect :))
The code before was obviously buggy - look at some of the "if"
statements - so I've re-written it. It appears to work in all cases I
tried.
libgd has a requirement that start_angle < end_angle, and draws
clockwise between the two. It doesn't like -ve angle inputs.
So.. for example, to draw between -10 and 10 degrees, spanning an arc of
20 degrees, you'd pass start_angle = 350 and end_angle = 370.
(I think it also works with start_angle = 350 and end_angle = 10 but the
manual does specifically say end_angle must be greater than start_angle)
*** If you want to wait on this bug, until after the noscreen work
merges - there is already a combined fix for this and noscreen in my
branch (git - not CVS yet) ***
--
Peter Clifton
Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA
Tel: +44 (0)7729 980173 - (No signal in the lab!)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arc_draw_libgd.patch
Type: text/x-patch
Size: 1162 bytes
Desc: not available
Url : http://www.seul.org/pipermail/geda-dev/attachments/20061230/564e8bb0/arc_draw_libgd.bin
More information about the geda-dev
mailing list