[cairo] adding a new curve type to cairo

Ralph Giles giles at xiph.org
Wed Jul 12 10:35:07 PDT 2006


On Wed, Jul 12, 2006 at 12:47:51PM -0400, Paul Davis wrote:

> one of our interests is in getting "native" support from the graphics
> library for a rather unique type of constrained spline that we use. at
> the moment, we never draw these curves because (a) libart_lgpl does not
> support them and (b) we would want them anti-aliased, which looks more
> complex than any of our developers has wanted to tackle so far. instead,
> we just draw straight line segments through the control points for the
> splines.

The usual solution here is to develop a fitting algorithm to approximate 
the custom curve with a bezier path. This requires only half the rocket
science of drawing the original antialiased (or twice, depending on how
hard you're going to try to preserve the features :) scales better than
line segments and is generally portable, since almost everything 
supports bezier paths these days.

 -r


More information about the cairo mailing list