[cairo] Two usage questions( matrix and fill with dash stroke)

Behdad Esfahbod behdad at behdad.org
Wed Apr 9 11:38:46 PDT 2008

On Wed, 2008-04-09 at 14:00 -0400, Bill Spitzak wrote:

> If the determinant (m.xx*m.yy-m.yx*m.xy) is zero then it is a
> degenerate 
> transform which transforms everything to a point or a line and the
> above 
> results are garbage. It is best to skip these. You may be tempted to 
> think you can figure out the rotation of the line but I have found
> that 
> to be much harder than it looks.

Humm, why?  Take any three non-colinear points, say (0,0), (1,0), (0,1),
transform them.  If they are all equal, matrix is a 0-rank degenerate
one that maps all points to that single point.  Otherwise you have at
least two different points in the range space, use them to find the
angle of the line.


"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