diff options
author | Bryce Harrington <b.harrington@samsung.com> | 2014-02-24 18:44:11 -0800 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2014-11-27 12:07:03 -0800 |
commit | cd5540951a4b3a58e27f5e86d3e44547b1458dea (patch) | |
tree | 6f2bd8d27455d4d23cc5284ff85d1f2f0afa375a /src/cairo-matrix.c | |
parent | 2fbf9f5cc3443c2025af92e63bf8e1620c720b3f (diff) |
matrix: Update code docs for projective transform
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Diffstat (limited to 'src/cairo-matrix.c')
-rw-r--r-- | src/cairo-matrix.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/cairo-matrix.c b/src/cairo-matrix.c index 2f0e439eb..21c717e04 100644 --- a/src/cairo-matrix.c +++ b/src/cairo-matrix.c @@ -54,13 +54,14 @@ * * #cairo_matrix_t is used throughout cairo to convert between different * coordinate spaces. A #cairo_matrix_t holds an affine transformation, - * such as a scale, rotation, shear, or a combination of these. + * such as a scale, rotation, shear, or a combination of these, and can + * also hold a projective transformation. * The transformation of a point (<literal>x</literal>,<literal>y</literal>) * is given by: * * <programlisting> - * x_new = xx * x + xy * y + x0; - * y_new = yx * x + yy * y + y0; + * x_new = (xx * x + xy * y + x0) / (px * x + py * y + 1); + * y_new = (yx * x + yy * y + y0) / (px * x + py * y + 1); * </programlisting> * * The current transformation matrix of a #cairo_t, represented as a @@ -108,6 +109,12 @@ slim_hidden_def(cairo_matrix_init_identity); * y_new = yx * x + yy * y + y0; * </programlisting> * + * Note if any projective transformation had been applied to the + * matrix it is removed (i.e. px and py are set to 0). + * + * <programlisting> + * </programlisting> + * * Since: 1.0 **/ void |