gEDA-dev: Broken libgd support in gschem (arc drawing) PATCH

Bert Timmerman bert.timmerman at xs4all.nl
Sun Dec 31 07:49:08 EST 2006


Hi all,

Is this the same behaviour as in:

placing a "capacitor-2.sym" symbol,

writing a PNG file,

opening the PNG file with a viewer,

and observing that the arc is drawn the wrong way around.

Some details: gschem and friends 20060906 on a FC5 box. 

BTW: I do not like to send binaries (PNG) to the list so you have to see if
you can reproduce this one yourself.

Kind regards,

Bert Timmerman.

-----Oorspronkelijk bericht-----
Van: geda-dev-bounces at moria.seul.org
[mailto:geda-dev-bounces at moria.seul.org] Namens Peter Clifton
Verzonden: zaterdag 30 december 2006 19:59
Aan: gEDA developer mailing list
Onderwerp: gEDA-dev: Broken libgd support in gschem (arc drawing) PATCH

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!)



More information about the geda-dev mailing list