CAIRO_MATRIX_INIT(3) 1 CAIRO_MATRIX_INIT(3)
CairoMatrix::__construct - Creates a new CairoMatrix object
Object oriented style (method):
SYNOPSIS
public CairoMatrix::__construct ([float $xx = 1.0], [float $yx = 0.0], [float $xy = 0.0], [float $yy = 1.0], [float $x0 = 0.0], [float
$y0 = 0.0])
DESCRIPTION
Procedural style:
object cairo_matrix_init ([float $xx = 1.0], [float $yx = 0.0], [float $xy = 0.0], [float $yy = 1.0], [float $x0 = 0.0], [float $y0 =
0.0])
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;
PARAMETERS
o $xx
- xx component of the affine transformation
o $yx
- yx component of the affine transformation
o $xy
- xy component of the affine transformation
o $yy
- yy component of the affine transformation
o $x0
- X translation component of the affine transformation
o $y0
- Y translation component of the affine transformation
RETURN VALUES
Returns a new CairoMatrix object that can be used with surfaces, contexts, and patterns.
EXAMPLES
Example #1
Object oriented style
<?php
/* Create a new Matrix */
$matrix = new CairoMatrix(1.0, 0.5, 0.0, 1.0, 0.0, 0.0);
?>
Example #2
Procedural style
<?php
/* Create a new Matrix */
$matrix = cairo_matrix_init(1.0, 0.5, 0.0, 1.0, 0.0, 0.0);
?>
SEE ALSO
CairoMatrix::initIdentity, CairoMatrix::initRotate, CairoMatrix::initScale, CairoMatrix::initTranslate.
PHP Documentation Group CAIRO_MATRIX_INIT(3)