[cairo] Path Gradients

jose_ogp at juno.com jose_ogp at juno.com
Fri Dec 21 13:28:55 PST 2007


	Behdad wrote:

> Humm, meshes in general would have made much more sense in cairo
> if it supported projective transformations.  What's people's insight
> about that?  Am I right that Xrender supports them?  What about
> PS/PDF/SVG?

	"Meshes" would need a suitable definition, but rectangular
and/or triangle meshes would likely be a welcome addition. Xrender
initially played around with "triangle fans and strips", but it seems
that never made it very far(?).
	I'm not sure why you feel that meshes would make 'more sense'
with projective transforms..? As far as projective transforms go, there
are certain "issues" you'd have to deal with because such transforms
don't - in general - preserve lines, or quadratics, or cubics... thus
making their use as transforms of "paths" somewhat problematic.
	Not to mention that transforms are often used via sampling in
an 'inverse' way.. and such transforms, while their 3x3 matrices may
be invertible, may not in effect be invertible when used as transforms
acting on 2D coordinates.
	It is possible to do things in a 2-step process, wherein one
could apply an affine transform on paths and a projective one on the
rasterized result - ie. first transform back via the projective one,
and then work 'as usual' in that coordinate system.

	Regardless of their possible use with paths though, they could
be useful on patterns, and for 'cairo paint' of images.. and also for
use with painting of patterned rectangle meshes.

   jose.

_____________________________________________________________
Click here to find experienced pros to help with your home improvement project.
http://thirdpartyoffers.juno.com/TGL2121/fc/Ioyw6i3nHrl5sm8Vu3QybRlwLHrqIaxhrKgiHmyMQDi70H4UukaOWx/




More information about the cairo mailing list