[cairo] Projective transformations

Bill Spitzak spitzak at d2.com
Wed Mar 21 04:00:46 PDT 2007


Carl Worth wrote:

> One problematic aspect is that a projective transformation would
> destroy the current algorithm implementing path stroking, (which
> currently pre-computes a pen that is assumed to be stable throughout
> the stroke). So there's at least one unsolved problem there.

It would not be a problem if the pen and font were fixed to the ctm at 
the moment they were specified, rather than changing with the ctm. This 
is in fact one of the primary reasons I want this change.

The result you are suggesting is not very useful, as it can be 
duplicated by drawing on a flat surface and then perspective 
transforming that image, and in fact that is probably the only practical 
way to implement it. Far more interesting is to be able to draw with a 
pen and font that does not change size with distance and remains 
parallel to the screen, which has the added benefit that it is quite 
easy to make the existing Cairo do this.

PS: Choosing a font or line width when a perspective transform is in 
effect should choose the affine transform that would happen for x==y==0.


More information about the cairo mailing list