[cairo-commit] cairo/src cairo_matrix.c,1.18,1.19

Owen Taylor commit at pdx.freedesktop.org
Thu Mar 17 11:24:02 PST 2005


Committed by: otaylor

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv5894/src

Modified Files:
	cairo_matrix.c 
Log Message:
2005-03-17  Owen Taylor  <otaylor at redhat.com>

        * src/cairo_matrix.c: Fix the docs to to correctly describe
        the order of transformation for muliply/scale/rotate/translate.
        (cairo_matrix_translate): Fix translate/rotate typo in the
        parameter descriptions.


Index: cairo_matrix.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_matrix.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- cairo_matrix.c	25 Feb 2005 21:31:00 -0000	1.18
+++ cairo_matrix.c	17 Mar 2005 19:24:00 -0000	1.19
@@ -222,12 +222,13 @@
 /**
  * cairo_matrix_translate:
  * @matrix: a cairo_matrix_t
- * @tx: amount to rotate in the X direction
- * @ty: amount to rotate in the Y direction
+ * @tx: amount to translate in the X direction
+ * @ty: amount to translate in the Y direction
  * 
  * Applies a translation by @tx, @ty to the transformation in
- * @matrix. The new transformation is given by first translating by
- * @tx, @ty then applying the original transformation
+ * @matrix. The effect of the new transformation is to first translate
+ * the coordinates by @tx and @ty, then apply the original transformation
+ * to the coordinates.
  * 
  * Return value: %CAIRO_STATUS_SUCCESS, always.
  **/
@@ -257,9 +258,9 @@
  * @sx: Scale factor in the X direction
  * @sy: Scale factor in the Y direction
  * 
- * Applies scaling by @tx, @ty to the transformation in
- * @matrix. The new transformation is given by first scaling by @sx
- * and @sy then applying the original transformation
+ * Applies scaling by @tx, @ty to the transformation in @matrix. The
+ * effect of the new transformation is to first scale the coordinates
+ * by @sx and @sy, then apply the original transformation to the coordinates.
  * 
  * Return value: %CAIRO_STATUS_SUCCESS, always.
  **/
@@ -302,8 +303,9 @@
  *  clockwise.
  * 
  * Applies rotation by @radians to the transformation in
- * @matrix. The new transformation is given by first rotating by
- * @radians then applying the original transformation
+ * @matrix. The effect of the new transformation is to first rotate the
+ * coordinates by @radians, then apply the original transformation
+ * to the coordinates.
  * 
  * Return value: %CAIRO_STATUS_SUCCESS, always.
  **/
@@ -324,12 +326,19 @@
  * @b: a @cairo_matrix_t
  * 
  * Multiplies the affine transformations in @a and @b together
- * and stores the result in @result. The resulting transformation
- * is given by first applying the transformation in @b then
- * applying the transformation in @a.
- * 
+ * and stores the result in @result. The effect of the resulting
+ * transformation is to first apply the transformation in @a to the
+ * coordinates and then apply the transformation in @b to the
+ * coordinates.
+ *
  * Return value: %CAIRO_STATUS_SUCCESS, always.
  **/
+/*
+ * XXX: The ordering of the arguments to this function corresponds
+ *      to [row_vector]*A*B. If we want to use column vectors instead,
+ *      then we need to switch the two arguments and fix up all
+ *      uses.
+ */
 cairo_status_t
 cairo_matrix_multiply (cairo_matrix_t *result, const cairo_matrix_t *a, const cairo_matrix_t *b)
 {




More information about the cairo-commit mailing list