[cairo] Projective transforms

Jeremy Moles jeremy at emperorlinux.com
Wed Aug 11 13:21:14 PDT 2010

On Wed, 2010-08-11 at 22:16 +0200, Maarten Bosmans wrote:
> 2010/8/11 Benjamin Otte <otte at redhat.com>:
> > On Wed, 2010-08-11 at 09:47 +0200, Maarten Bosmans wrote:
> >> Does this mean that projective transformations are possible in Cairo?
> >> What would be required to use it?
> >>
> > It means projective transforms are possible in Pixman. Using them in
> > Cairo has been a desire for a while, but no one has yet attempted to
> > implement it.
> I could not find the implementation pixman. The file pixman-matrix.c
> only deals with 3x3 matrices used for affine transformations. Am I
> missing something?
> The SVG 1.1 spec only defines affine transformations. A proposed
> extension to include projective transformations is a working draft:
> http://www.w3.org/TR/2009/WD-SVG-Transforms-20090320/
> That page nicely lays out the use of homogeneous coordinates in 2D and
> 3D and how the conversion works. It could be used as a guide for
> implementing in pixman and of course also for the cairo svg surface.
> If the general outline of implementing such a thing in cairo (and
> pixman?) becomes clear, I can certainly try to whip up some patches.
> My main motivation would be to enable the rendering of animated text
> in a projective plain, like the classic Star Wars prologue.

And for me I could create interesting pseudo 3D GUI's in OpenGL without
being a victim of some of the strange quality problems I encounter when
I do the same thing by rendering the entire UI to a texture and then
rotating that texture. :)

> Maarten
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo

Follow us on Twitter! http://twitter.com/emperorlinux

EmperorLinux, Inc.

More information about the cairo mailing list