[cairo] Adding cairo_shear and family

Behdad Esfahbod behdad at behdad.org
Mon Jan 19 23:32:17 PST 2009


M Joonas Pihlaja wrote:

> FWIW, I liked Bill's and Paolo's approach of an area preserving mapping
> (this being one of the properties of a shear) and along those lines I
> would propose using
> 
> [1 +- sqrt(-sx*sy)    sx
> sy            1 -+ sqrt(-sx*sy)],

I initially liked it too.  But it's too hard to see what that's doing.  The
good thing about [1 sx sy 1] is that combined with a cairo_scale, you can map
your two coordinates onto arbitrary vectors *easily* just by a cairo_scale and
a cairo_shear.  That's not the case with the area-preserving variant.

> We'll just have to agree to disagree. :)

Sure.

Cheers,

behdad

> Cheers,
> 
> Joonas
> 


More information about the cairo mailing list