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

Bryce Harrington bryce at osg.samsung.com
Wed Dec 3 12:33:00 PST 2014


On Sat, Nov 29, 2014 at 10:47:07AM +0000, Chris Wilson wrote:
> 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
> points.

I understand.  Setting up a whole new type for this seems like a lot of
work though.
 
> 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.

I'm not sure I follow what you're referring to here?

Bryce


More information about the cairo mailing list