[cairo] [PATCH 0/6 v0] RFC: Projective transformation

Chris Wilson chris at chris-wilson.co.uk
Sat Nov 29 02:47:07 PST 2014

On Fri, Nov 28, 2014 at 08:31:18PM -0800, Bryce Harrington wrote:
> This resurrects a patch proposed some years back for adding 2d
> projective transformation support to Cairo.  I've reviewed and updated
> the patch for the current codebase, and made a test demo to try it out.
> There's a bug that occurs on rotational transformations that I haven't
> figured out -- suggestions appreciated.
> You might recall that this time last year there was a discussion here
> about 4x4 matrices in Cairo for doing more advanced 3d transformations.
> There were doubts expressed about whether that would stretch Cairo's
> focus too far.  However, 2d projective transformation requires only 2
> elements to added to Cairo's matrix support so perhaps is more
> in-scope.

It's pretty simple, we can not change cairo_matrix_t without
breaking ABI. Any perspective matrix must be a new type with new entry

It also looks like you haven't thought about stroking under a
perspective transform, which is the tricky part. The easiest way to
first sketch it out is to do a stroke onto the orthogonal plane and then
do the perspective transformation.

Chris Wilson, Intel Open Source Technology Centre

More information about the cairo mailing list