Package: cairo
Function cairo:matrix-init
Lambda Listcairo:matrix-init (matrix xx yx xy yy x0 y0) ArgumentsReturn ValueThe initialized cairo:matrix-t instance. Details Sets the matrix to be the affine transformation given by the xx, yx, xy, yy, x0, y0 arguments.
The transformation is given by: xnew = xx * x + xy * y + x0 ynew = yx * x + yy * y + y0The cairo:with-matrix and cairo:with-matrices macros are more convenient for defining and initialising a matrix in one step. Examples(cffi:with-foreign-object (matrix '(:struct cairo:matrix-t)) (cairo:matrix-init matrix 0.5 0.0 0.0 1.0 2.0 3.0) (cairo:matrix-to-float matrix)) => (0.5d0 0.0d0 0.0d0 1.0d0 2.0d0 3.0d0)Defining and initialising a matrix with the cairo:with-matrix macro. (cairo:with-matrix (matrix 1/2 0 0 1 2 3) (cairo:matrix-to-float matrix)) => (0.5d0 0.0d0 0.0d0 1.0d0 2.0d0 3.0d0) Notes | See also |
2025-1-18