[Cairo] Color transforms
cworth at east.isi.edu
Wed Jul 16 11:20:35 PDT 2003
David and Bill,
Thanks for starting some ideas about virtualizing the backend. I hope
to be able to take a closer look at this soon and make some concrete
In the meantime, one nitpicky response to a comment not actually part
of the main thread:
On Jul 16, Bill Spitzak wrote:
> Curveto is then implemented portably by transforming the points,
> figuring out the subdivisions so the error is less than 1/4
> transformed pixel, and then calling the transformed interface with
> the resulting line segments.
Actually, it's important to keep the curve as a curve, (rather than an
approximation by line segments), until the stroke operation [*].
Approximating the curve to within an error value is a very different
thing than approximating the stroked outline to within the same error
value. Many graphics systems get this wrong and the resulting errors
can be visible with large line width and sharp curvature.
[*] Warning, the following paragraph is for pedants only:
Someone familiar with the algorithm within Cairo might point out that
the curve stroking algorithm actually does operate on a piecewise
linear approximation of the curve. So the approximation could happen
earlier. But the path data structure would have to maintain the
distinction between linear segments belonging to curves vs. those
belonging to true linear path segments so the joins could be handled
differently. Come to think of it, for round joins no distinction is
actually needed --- sounds like there's room for a minor optimization
of round joins here.
More information about the cairo