18 Sep 2004 nomis   » (Master)

Continuing the habit of updating Advogato every year... :-)

The Path tool is in a stable release of The GIMP and it seems to work. My contributions to the GIMP are currently limited to small fixes here and there. Currently I am looking at the code of potrace (which rocks) to improve the stroking of a selection boundary. Gimp really does a horrible job at doing this, especially with the libart stroking (not the fault of libart - the boundary of the selection is along the pixel boundaries, so that libart has no chance to do proper antialiasing...).

raph: FontFocus looks amazing. Hopefully you can work out a good scheme to make it available to the free software community. Does FontFocus work in X and Y direction? The Times-"T" suggests that it doesn't apply in Y direction, but you mentioned that it works word-based, so it might have preferred the ex-height because it is more important.

About curve primitives: I have no experience with cornu splines and I currently cannot imagine how they would be edited. I have some experience with bezier curves (obviously...) and I think that there is room for improvement in the "typical" user interface to edit them. The average program has the two anchors and two control points, with the control points being way off the actual curve. About four years ago Bernhard Herzog picked up a suggestion by me for sketch (now skencil) to enable the user to drag on any point of the bezier segment and have immediate control over the segment without having to do guesswork with the control points. A refined version of this is implemented in the Path tool of the GIMP. Do some clicks in the image to create some segments, and click-drag on arbitrary points of the path to drag the segment around.

When you got used to this you can use less control points to approximate a given shape manually. You don't need to subdivide a segment as often, which would make the path harder to handle.

The math is easy: You want to move the curve point at parameter t a certain delta, so simply add a scalar multiple of this delta to each of the two control points (the amount can easily be figured out when looking at the formula for the bezier curve). There even is a degree of freedom to distribute the change between the two control points. I used that to change the first control point when t is small, the second when t is big and a smooth transition inbetween.

Someone suggested to just change the length of the "control tangents" to move the dragged point around. This would have the advantage that "smooth" joins of bezier segments would keep this property without changing the neighbor segment. The obvious problem with this is, that this requires the tangents to be linearily independant. Also it would change the overall shape of the segment (e.g. introducing a loop) for big changes. Thats why I decided against this.

The current way feels quite natural and is IMHO fairly transparent to the user. I did not dare to actually make the control points invisible to the user, but they definitely became less important...

The point I am trying to make: I don't think that the fundamental primitive is that important. It is the way we present it to the user that makes the difference.

That having said: Cornu splines obviously will be approximated with e.g. beziers at some point, so we are actually talking about user interface here... :-)

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!