From 4dcc6025cbb4c3cd844ca568026ef7a653fa0a22 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Thu, 26 Aug 2021 21:48:17 +0700 Subject: document gd Matrix --- src/gd_matrix.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gd_matrix.c b/src/gd_matrix.c index ada63e6..def3f3c 100644 --- a/src/gd_matrix.c +++ b/src/gd_matrix.c @@ -12,7 +12,28 @@ /** * Title: Matrix * Group: Affine Matrix - */ + * + * Matrix functions to initialize, transform and various other operations + * on these matrices. + * They can be used with gdTransformAffineCopy and are also used in various + * transformations functions in GD. + * + * matrix are create using a 6 elements double array: + * (start code) + * matrix[0] == xx + * matrix[1] == yx + * matrix[2] == xy + * matrix[3] == xy + * matrix[4] == x0 + * matrix[5] == y0 + * (end code) + * where the transformation of a given point (x,y) is given by: + * + * (start code) + * x_new = xx * x + xy * y + x0; + * y_new = yx * x + yy * y + y0; + * (end code) +*/ /** * Function: gdAffineApplyToPointF -- cgit v1.2.1