array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.imageaffinematrixget.php', 1 => 'imageaffinematrixget', ), 'up' => array ( 0 => 'ref.image.php', 1 => 'GD および Image 関数', ), 'prev' => array ( 0 => 'function.imageaffinematrixconcat.php', 1 => 'imageaffinematrixconcat', ), 'next' => array ( 0 => 'function.imagealphablending.php', 1 => 'imagealphablending', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', '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 — アフィン変換行列を取得する
type
定数 IMG_AFFINE_*
のいずれか。
options
type
が IMG_AFFINE_TRANSLATE
あるいは IMG_AFFINE_SCALE
の場合は、
options
は x
と
y
をキーとする配列でなければいけません。
それぞれの値は float にする必要があります。
type
が IMG_AFFINE_ROTATE
、
IMG_AFFINE_SHEAR_HORIZONTAL
、
IMG_AFFINE_SHEAR_VERTICAL
のいずれかである場合は、
options
はアングルを指定する float 値でなければいけません。
0
から 5
までのキーに float 値を持つ配列を返します。失敗した場合に false
を返します。
例1 imageaffinematrixget() の例
<?php
$matrix = imageaffinematrixget(IMG_AFFINE_TRANSLATE, array('x' => 2, 'y' => 3));
print_r($matrix);
?>
上の例の出力は以下となります。
Array ( [0] => 1 [1] => 0 [2] => 0 [3] => 1 [4] => 2 [5] => 3 )