CairoMatrix::__construct
cairo_matrix_init
(PECL cairo >= 0.1.0)
CairoMatrix::__construct -- cairo_matrix_init — Crée un nouvel objet CairoMatrix
Description
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
]]]]]] )Retourne 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;
Liste de paramètres
-
xx -
Composant en xx de la transformation affine.
-
yx -
Composant en yx de la transformation affine.
-
xy -
Composant en xy de la transformation affine.
-
yy -
Composant en yy de la transformation affine.
-
x0 -
Composant de la traduction en X de la transformation affine.
-
y0 -
Composant de la traduction en Y de la transformation affine.
Valeurs de retour
Retourne un nouvel objet CairoMatrix qui peut être utilisé avec les surfaces, les contextes ainsi que les masques.
Exemples
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); ?>
Voir aussi
- CairoMatrix::initIdentity() - Crée une nouvelle matrice d'identité
- CairoMatrix::initRotate() - Crée une nouvelle matrice de rotation
- CairoMatrix::initScale() - Crée une nouvelle matrice de mise à l'échelle
- CairoMatrix::initTranslate() - Crée une nouvelle matrice de traduction
