Sunday, 4 May 2008

gschem with b-spline paths and filled sections

Just thought I'd share a couple of screen-shots of a feature hopefully targeted for gEDA 1.6.0, support for closed / filled polygons.

Since its simple to do so with cairo, I've implemented this a an arbitrary SVG type path string. Code-reuse from librsvg (LGPL) made this a more approachable task.

At the moment, the code allows modification of existing paths from within gschem by dragging the control points, but you can't yet create new paths, add / remove nodes or change node-types.

At the very least, we could hope to support reading and rendering polygons / closed arbitrary paths for gEDA 1.6.0, so if anyone is keen, the stock libraries can be improved with this pretty'fication. I already made a stab at the bipolar transistors.

Saturday, 3 May 2008

Cairo support for gschem

Following the merge of Werner's branch elimitnating the remaining usage of screen coordinates in gschem's graphics state, gschem is far better at allowing you to zoom and pan whilst making drawing operations.

I have since rebased my pending changes to the object "place" code (inserting symbols, copy / paste with buffers, move, copy, multi-copy etc..) and on top of that branch, have revived the experimental cairo rendering code I started what seems forever ago.

The screenshot above shows cairo rendering of all primitives, including the text (which is via cairo's "toy" text API). Work to allow support of gschem's existing line-font is underway, but dependant on new API aditions scheduled for cairo 1.8. I think I'm getting used to the "Sans" font in gschem, so perhaps that will have to remain an option.

The code is distilling nicely now, and by cooperating with existing code (XOR drawing with GDK during rubberbanding and placing), I now have a branch where pretty graphics are available without the bugs and cut down functionality of my old branch (which removed essential code, but hadn't quite got to replacing it).