(PECL cairo >= 0.1.0)
CairoMatrix::__construct -- cairo_matrix_init — Crée un nouvel objet CairoMatrix
Style orienté objet (méthode) :
$xx = 1.0
[, float $yx = 0.0
[, float $xy = 0.0
[, float $yy = 1.0
[, float $x0 = 0.0
[, float $y0 = 0.0
]]]]]] )Style procédural :
$xx = 1.0
[, float $yx = 0.0
[, float $xy = 0.0
[, float $yy = 1.0
[, float $x0 = 0.0
[, float $y0 = 0.0
]]]]]] ) : objectRetourne un nouvel objet CairoMatrix. Les matrices sont utilisés à travers Cairo pour convertir différents espaces de coordonnées. Définissez une matrice pour être une transformation affine fournie par xx, yx, xy, yy, x0, y0. La transformation est fournie par : x_new = xx * x + xy * y + x0; and y_new = yx * x + yy * y + y0;
xxComposant en xx de la transformation affine.
yxComposant en yx de la transformation affine.
xyComposant en xy de la transformation affine.
yyComposant en yy de la transformation affine.
x0Composant de la traduction en X de la transformation affine.
y0Composant de la traduction en Y de la transformation affine.
Retourne un nouvel objet CairoMatrix qui peut être utilisé avec les surfaces, les contextes ainsi que les masques.
Exemple #1 Style orienté objet
<?php
/* Crée une nouvelle matrice */
$matrix = new CairoMatrix(1.0, 0.5, 0.0, 1.0, 0.0, 0.0);
?>
Exemple #2 Style procédural
<?php
/* Crée une nouvelle matrice */
$matrix = cairo_matrix_init(1.0, 0.5, 0.0, 1.0, 0.0, 0.0);
?>