[cairo] Projective transformations

Behdad Esfahbod behdad at behdad.org
Wed Mar 21 06:42:59 PDT 2007


On Wed, 2007-03-21 at 07:00 -0400, Bill Spitzak wrote:
> 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.

Good points.  Maybe we can start up the lock-pen-width thread again.
Anyone volunteering to update the patch to current master?

Speaking of projective transformations, they make
cairo_transform_distance() obsolete.

-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759





More information about the cairo mailing list