[cairo] adding a new curve type to cairo
Carl Worth
cworth at cworth.org
Wed Jul 12 13:44:42 PDT 2006
On Wed, 12 Jul 2006 12:47:51 -0400, Paul Davis wrote:
> i would be interested in an estimate of how hard it would be to add this
> spline to cairo's primitives so that we can trivially get these
> displayed with anti-aliasing on a cairo-based canvas?
Others have already answered, but I'll throw in a reply as well...
There are any number of interesting splines that applications will
want to use, (and new ones can be invented regularly). We don't intend
to continually extend the set of splines directly supported in cairo.
Instead, cairo will simply advertise only[*] cubic Bézier splines as a
primitive, as it currently does with the cairo_curve_to function.
So, code above cairo should be written to approximate your favorite
splines with one or more cubic Bézier splines.
-Carl
[*] Yes, cairo does have one non-primitive curve function with
cairo_arc for circular arcs, which are really, really common, but
poorly approximated with individual cubic Béziers, (even the common
approach of 4 cubic Béziers per circle is poor, so cairo_arc does
better than that when necessary).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060712/b2c3c408/attachment.pgp
More information about the cairo
mailing list