gEDA-dev: Broken libgd support in gschem (arc drawing) PATCH
Carlos Nieves Ónega
cnieves.mail at gmail.com
Fri Jan 5 14:13:11 EST 2007
El sáb, 30-12-2006 a las 18:59 +0000, Peter Clifton escribió:
> 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) ***
It also works for me.
I think Ales wants to do a release before that, so maybe it is better to
apply it.
I'm not sure if committing this patch will make your branch work harder,
so I'd let you do it.
OTOH, I noticed that libgd's output doesn't support dashed or dotted
lines/arcs. I wonder if it has ever supported them...
Regards,
Carlos
More information about the geda-dev
mailing list