array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'fr', ), 'this' => array ( 0 => 'function.imageaffinematrixget.php', 1 => 'imageaffinematrixget', ), 'up' => array ( 0 => 'ref.image.php', 1 => 'Fonctions GD et images', ), 'prev' => array ( 0 => 'function.imageaffinematrixconcat.php', 1 => 'imageaffinematrixconcat', ), 'next' => array ( 0 => 'function.imagealphablending.php', 1 => 'imagealphablending', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'fr', 'path' => 'reference/image/functions/imageaffinematrixget.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.5.0, PHP 7, PHP 8)
imageaffinematrixget — Obtenir une matrice de transformation affine
Retourne une matrice de transformation affine.
type
Une constante parmi IMG_AFFINE_*
.
options
Si type
est IMG_AFFINE_TRANSLATE
ou IMG_AFFINE_SCALE
,
options
doit être un array avec
les clés x
et y
, les deux étant des valeurs float.
Si type
est IMG_AFFINE_ROTATE
,
IMG_AFFINE_SHEAR_HORIZONTAL
ou
IMG_AFFINE_SHEAR_VERTICAL
,
options
doit être une valeur float
spécifiant l'angle.
Une matrice de transformation affine (un tableau avec des clés de 0
à 5
et nombres décimaux en valeur).
ou false
si une erreur survient.
Exemple #1 Exemple pour imageaffinematrixget()
<?php
$matrix = imageaffinematrixget(IMG_AFFINE_TRANSLATE, array('x' => 2, 'y' => 3));
print_r($matrix);
?>
L'exemple ci-dessus va afficher :
Array ( [0] => 1 [1] => 0 [2] => 0 [3] => 1 [4] => 2 [5] => 3 )