(PECL cairo >= 0.1.0)
CairoMatrix::__construct -- cairo_matrix_init — Creates a new CairoMatrix object
Object oriented style (method):
Procedural style:
Returns new CairoMatrix object. Matrices are used throughout cairo to convert between different coordinate spaces. Sets matrix to be the affine transformation given by xx, yx, xy, yy, x0, y0. The transformation is given by: x_new = xx * x + xy * y + x0; and y_new = yx * x + yy * y + y0;
xx component of the affine transformation
yx component of the affine transformation
xy component of the affine transformation
yy component of the affine transformation
X translation component of the affine transformation
Y translation component of the affine transformation
Returns a new CairoMatrix object that can be used with surfaces, contexts, and patterns.
例1 Object oriented style
<?php
/* Create a new Matrix */
$matrix = new CairoMatrix(1.0, 0.5, 0.0, 1.0, 0.0, 0.0);
?>
例2 Procedural style
<?php
/* Create a new Matrix */
$matrix = cairo_matrix_init(1.0, 0.5, 0.0, 1.0, 0.0, 0.0);
?>