Re: Extracting The Scaling Component Of A Matrix
Behdad Esfahbod <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On 15-12-11 01:51 AM, Lawrence D'Oliveiro wrote: > I construct a matrix that implements just the scaling component of the > CTM in the Cairo context “ctx”: > > scaling = Matrix.scale(ctx.user_to_device_distance(Vector(1, 1))) This wouldn't do what you think it does for general matrices. Or maybe I don't understand what you are trying to do. Are you only interested in non-skewed matrices? > This can be easily adapted to extracting the scaling component of a > given matrix “mat”: > > scaling = Matrix.scale(mat.mapdelta(Vector(1, 1))) > > Exercise: can you come up with a similarly simple expression for > extracting the angle of the rotation component of a matrix? > -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo