Today’s been a pretty good day for Inkscape coding. Aside from once again having the bad choice of extending DrawContext confirmed, I managed to pass several little hurdles and get the connectors connecting to shapes. That is, get the connector context to create paths that hook up with Peter’s existing connector code. The funniest bug was that it turned out I was not creating a purely straight-line path, just a curved path that looked straight—when I dragged a shape and the connector rerouted, it went into a strange curve shape! I love bugs that express themselves graphically. Sure beats a segfault.
Archive for July, 2005
When straight lines aren’t
Sunday, July 31st, 2005SoC Progress
Saturday, July 30th, 2005This is basically a report on my progress, as posted to the inkscape-devel list this morning, but with lots of spelling and grammer corrections!
Powerbook Problems
Friday, July 29th, 2005Well, I’m sitting here right now, installing Debian on a dekstop computer at my place. Why? Because, for about the last year I’ve been using an Apple Powerbook as my main development machine and it just died.
I opened the lid on Thursday morning ready to start work, expecting to be greeted by it’s warm glow. Nothing. I pressed the left arrow key (this usually wakes it up). Not this morning. It was working hard last night. Sure, but this is ridiculous. It got a few good hours of rest! I pressed the power button. Nothing. Ah, maybe the battery had drained over night? Hadn’t suspended properly, maybe? Plugged in the power cable. Pressed the power button. It starts. Sort of. There are three tones, then the clasp light flashes four times. Nothing more.
I drove to Uni and spent some time seeing if anyone had a firewire cable to see if I could start it in target mode to get a copy of my Inkscape SoC workspace off it. Everything on there is backed up, but the copy of the Inkscape stuff was a little out of date. Anyway, noone had one so of I went to the Apple service people. I told them I really wanted some of the data off there if possible. He suggested they try replacing the RAM first. Did this, the computer started fine. Problem fixed.
I drove back to Uni and worked for the rest of the afternoon hours. Drove home. Opened the lid, made a small change to some code to try something else. dropped back to a shell, typed “make”, and the computer froze. Rebooted it and found three beeps and the four flashes again. So I guess the problem is the logic board after all. *sigh*
The computer is back with the Apple service people. I’ll probably get it back in a week and a half. I got my workspace off it though, and it looks like my Debian install is finished now, so back to it…
Paper Acceptance
Thursday, July 21st, 2005My paper entitled “Incremental Connector Routing” was accepted to Graph Drawing 2005 so I’ll be going to Limerick, Ireland in mid September to present it. This paper describes the algorithms that are used in the “libavoid” code, that will be integrated into Inkscape as part of my Sumer of Code work.
Also, it seems like there will be a Software Exhibition, where you can show of cool graph drawing code. So I should be able to show off not only Dunnart, my research test-bed diagram editor, but also the same capabilities integrated into Inkscape.
Very nice indeed!
Drawing connectors in Inkscape
Thursday, July 21st, 2005It’s time to start blogging about this project more actively I think. David Yip, one of the other Inkscape SoCers is putting me to shame. Haven’t seen any blogging from the other two SoC people yet though.
I feel like there has been a lot of paperwork in the last couple of weeks. Some non-US students (like myself) have started to call this Google thing the “Summer of Tax Code” because there has been so much confusion and discussion over taxation issues. It’s ironic how hard it is to give away money. Along with this mound of stuff to organise (most of it is done) I’ve just had to organise PhD progress reports and just now paperwork for conference travel (more in the next post). I think it’s taking me six forms to get to this conference, and that’s before I look at airfares, or conference registration…
Inkscape hacking is much more fun!
For SoC I am doing two things. Firstly, cleaning up and releasing as a LGPL library some code I have written to do incremental object-avoiding connector routing. The cleaning up and interface fixes (from where it was originally tied to my research code) is mostly done. I’ll probably create a Sourceforge project for the library very shortly. I’m thinking I’ll call it libavoid. The code will be added (and probably worked on) within the Inkscape codebase, since we definitely don’t want to add something so new as a dependency. It’ll also have it’s own CVS repository on Sorceforge since this was part of my proposal and it’s been written with the intention that othe software like Dia might want to make use of it.
The second part of my SoC stuff is adding connector capablities to Inkscape (and integrating with the library code). At the moment I have added a new context to Inkscape where connectors can be drawn and interacted with. I’m working on the code for creating connectors and changing their connections. My plan is to have the ability to create new basic straight connectors that follow shapes, as well as an interfact to detach/reconnect them to different objects for the time of the release when this stuff can be added to CVS. Then we can discuss some of the behaviour specifics for connectors and their GUI interface.
The code for updating connectors as a result of shapes moving is already in the codebase and was written some time ago by Peter Moulder, though there was never an interface created for working with them. There seem to be several issues (i.e., bugs) with this at present, so that wikl have to be looked at too.
I’ve found it quite time consuming working out how to do things at the canvas level within Inkscape. Its not that it’s been frustrating, it hasn’t, it just takes a while to figure things out when you’re unfamiliar with the codebase, and you’re not working on a surface feature that allows you to ignore large sections of code. Actually, once I work out the correct way to do things it often turns out that the solution is quite elegant, i.e., it’s been though that someone would later want to do this thing, or something similar is being done somewhere else in the code, so the framework is there. The new gradient tool handles code has been really useful for lifting ideas from. I get the feeling my work up until now would have been much harder without their example.
Inkscape on OS X
Wednesday, July 13th, 2005While this doesn’t have to do with the Summer of Code work, it’s still quite cool. Inkscape 0.42 will have an OS X .app style release, just like Gimp.app. I’ve spent a fair bit of time over the last month setting it all up and allowing automation of OS X builds. All you need is Apple’s X11User package installed and then Inkscape can be dragged to Applications, added to the dock, and launched in any expected way such as dropping SVG files on its dock icon.
Summer of Code
Saturday, July 9th, 2005Well, I was accepted in Google’s Summer of Code. So for the next couple of months I’ll be adding connectors to Inkscape, an open source vector graphics editor. You can read my proposal here.