summaryrefslogtreecommitdiff
path: root/src/cairo-matrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cairo-matrix.c')
-rw-r--r--src/cairo-matrix.c13
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