[cairo] cairo_append_path performance

Mike Emmel mike.emmel at gmail.com
Fri Sep 1 00:24:25 PDT 2006

Most graphics systems have the concept of a path  as a first class object.

In cairo we expose a path structure but its not the same as the one
used internally.

And you don't have access to many operations your would like to
perform on a path.
For example hit tests.

My solution is to use a cairo_t with a 1 pixel surface to represent a
path this gives
a nice api for paths except for one problem.

To copy this path to the real surface for rendering involves copying
it out into a cairo_path_t
then appending it to the real surface resulting in a path copy and a
performance problem
for large paths.

Can a new public method be added to do the copy using the internal
structure removing this
extra allocation ?

void cairo_append_path_from(to_cr,from_cr);

More information about the cairo mailing list