mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2026-03-06 13:54:12 +08:00
v0.0.2
This commit is contained in:
@@ -1,122 +1,122 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>Get an affine transformation matrix</title>
|
||||
</head>
|
||||
<body class="docs"><div id="layout">
|
||||
<div id="layout-content"><div id="function.imageaffinematrixget" class="refentry">
|
||||
<div class="refnamediv">
|
||||
<h1 class="refname">imageaffinematrixget</h1>
|
||||
<p class="verinfo">(PHP 5 >= 5.5.0, PHP 7)</p><p class="refpurpose"><span class="refname">imageaffinematrixget</span> — <span class="dc-title">Get an affine transformation matrix</span></p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="refsect1 description" id="refsect1-function.imageaffinematrixget-description">
|
||||
<h3 class="title">说明</h3>
|
||||
<div class="methodsynopsis dc-description">
|
||||
<span class="methodname"><strong>imageaffinematrixget</strong></span>
|
||||
( <span class="methodparam"><span class="type">int</span> <code class="parameter">$type</code></span>
|
||||
[, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$options</code></span>
|
||||
] ) : <span class="type">array</span></div>
|
||||
|
||||
<p class="para rdfs-comment">
|
||||
Returns an affine transformation matrix.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="refsect1 parameters" id="refsect1-function.imageaffinematrixget-parameters">
|
||||
<h3 class="title">参数</h3>
|
||||
<dl>
|
||||
|
||||
|
||||
<dt>
|
||||
<code class="parameter">type</code></dt>
|
||||
|
||||
<dd>
|
||||
|
||||
<p class="para">
|
||||
One of the <strong><code>IMG_AFFINE_*</code></strong> constants.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<code class="parameter">options</code></dt>
|
||||
|
||||
<dd>
|
||||
|
||||
<p class="para">
|
||||
If <code class="parameter">type</code> is <strong><code>IMG_AFFINE_TRANSLATE</code></strong>
|
||||
or <strong><code>IMG_AFFINE_SCALE</code></strong>,
|
||||
<code class="parameter">options</code> has to be an <span class="type"><a href="language.types.array.html" class="type array">array</a></span> with keys <em>x</em>
|
||||
and <em>y</em>, both having <span class="type"><a href="language.types.float.html" class="type float">float</a></span> values.
|
||||
</p>
|
||||
<p class="para">
|
||||
If <code class="parameter">type</code> is <strong><code>IMG_AFFINE_ROTATE</code></strong>,
|
||||
<strong><code>IMG_AFFINE_SHEAR_HORIZONTAL</code></strong> or <strong><code>IMG_AFFINE_SHEAR_VERTICAL</code></strong>,
|
||||
<code class="parameter">options</code> has to be a <span class="type"><a href="language.types.float.html" class="type float">float</a></span> specifying the angle.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="refsect1 returnvalues" id="refsect1-function.imageaffinematrixget-returnvalues">
|
||||
<h3 class="title">返回值</h3>
|
||||
<p class="para">
|
||||
An affine transformation matrix (an array with keys
|
||||
<em>0</em> to <em>5</em> and float values)
|
||||
或者在失败时返回 <strong><code>FALSE</code></strong>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="refsect1 examples" id="refsect1-function.imageaffinematrixget-examples">
|
||||
<h3 class="title">范例</h3>
|
||||
<p class="para">
|
||||
<div class="example" id="example-3654">
|
||||
<p><strong>Example #1 <span class="function"><strong>imageaffinematrixget()</strong></span> example</strong></p>
|
||||
<div class="example-contents">
|
||||
<div class="phpcode"><pre><span style="color: #000000">
|
||||
<span style="color: #0000BB"><?php<br />$matrix </span><span style="color: #007700">= </span><span style="color: #0000BB">imageaffinematrixget</span><span style="color: #007700">(</span><span style="color: #0000BB">IMG_AFFINE_TRANSLATE</span><span style="color: #007700">, array(</span><span style="color: #DD0000">'x' </span><span style="color: #007700">= </span><span style="color: #0000BB">2</span><span style="color: #007700">, </span><span style="color: #DD0000">'y' </span><span style="color: #007700">=> </span><span style="color: #0000BB">3</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$matrix</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span>
|
||||
</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
|
||||
<div class="example-contents"><p>以上例程会输出:</p></div>
|
||||
<div class="example-contents screen">
|
||||
<div class="cdata"><pre>
|
||||
Array
|
||||
(
|
||||
[0] => 1
|
||||
[1] => 0
|
||||
[2] => 0
|
||||
[3] => 1
|
||||
[4] => 2
|
||||
[5] => 3
|
||||
)
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="refsect1 seealso" id="refsect1-function.imageaffinematrixget-seealso">
|
||||
<h3 class="title">参见</h3>
|
||||
<p class="para">
|
||||
<ul class="simplelist">
|
||||
<li class="member"><span class="function"><a href="imageaffine.html" class="function" rel="rdfs-seeAlso">imageaffine()</a> - 返回经过仿射变换后的图像,剪切区域可选</span></li>
|
||||
<li class="member"><span class="function"><a href="imageaffinematrixconcat.html" class="function" rel="rdfs-seeAlso">imageaffinematrixconcat()</a> - Concatenate two affine transformation matrices</span></li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>Get an affine transformation matrix</title>
|
||||
</head>
|
||||
<body class="docs"><div id="layout">
|
||||
<div id="layout-content"><div id="function.imageaffinematrixget" class="refentry">
|
||||
<div class="refnamediv">
|
||||
<h1 class="refname">imageaffinematrixget</h1>
|
||||
<p class="verinfo">(PHP 5 >= 5.5.0, PHP 7)</p><p class="refpurpose"><span class="refname">imageaffinematrixget</span> — <span class="dc-title">Get an affine transformation matrix</span></p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="refsect1 description" id="refsect1-function.imageaffinematrixget-description">
|
||||
<h3 class="title">说明</h3>
|
||||
<div class="methodsynopsis dc-description">
|
||||
<span class="methodname"><strong>imageaffinematrixget</strong></span>
|
||||
( <span class="methodparam"><span class="type">int</span> <code class="parameter">$type</code></span>
|
||||
[, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$options</code></span>
|
||||
] ) : <span class="type">array</span></div>
|
||||
|
||||
<p class="para rdfs-comment">
|
||||
Returns an affine transformation matrix.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="refsect1 parameters" id="refsect1-function.imageaffinematrixget-parameters">
|
||||
<h3 class="title">参数</h3>
|
||||
<dl>
|
||||
|
||||
|
||||
<dt>
|
||||
<code class="parameter">type</code></dt>
|
||||
|
||||
<dd>
|
||||
|
||||
<p class="para">
|
||||
One of the <strong><code>IMG_AFFINE_*</code></strong> constants.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<code class="parameter">options</code></dt>
|
||||
|
||||
<dd>
|
||||
|
||||
<p class="para">
|
||||
If <code class="parameter">type</code> is <strong><code>IMG_AFFINE_TRANSLATE</code></strong>
|
||||
or <strong><code>IMG_AFFINE_SCALE</code></strong>,
|
||||
<code class="parameter">options</code> has to be an <span class="type"><a href="language.types.array.html" class="type array">array</a></span> with keys <em>x</em>
|
||||
and <em>y</em>, both having <span class="type"><a href="language.types.float.html" class="type float">float</a></span> values.
|
||||
</p>
|
||||
<p class="para">
|
||||
If <code class="parameter">type</code> is <strong><code>IMG_AFFINE_ROTATE</code></strong>,
|
||||
<strong><code>IMG_AFFINE_SHEAR_HORIZONTAL</code></strong> or <strong><code>IMG_AFFINE_SHEAR_VERTICAL</code></strong>,
|
||||
<code class="parameter">options</code> has to be a <span class="type"><a href="language.types.float.html" class="type float">float</a></span> specifying the angle.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="refsect1 returnvalues" id="refsect1-function.imageaffinematrixget-returnvalues">
|
||||
<h3 class="title">返回值</h3>
|
||||
<p class="para">
|
||||
An affine transformation matrix (an array with keys
|
||||
<em>0</em> to <em>5</em> and float values)
|
||||
或者在失败时返回 <strong><code>FALSE</code></strong>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="refsect1 examples" id="refsect1-function.imageaffinematrixget-examples">
|
||||
<h3 class="title">范例</h3>
|
||||
<p class="para">
|
||||
<div class="example" id="example-3654">
|
||||
<p><strong>Example #1 <span class="function"><strong>imageaffinematrixget()</strong></span> example</strong></p>
|
||||
<div class="example-contents">
|
||||
<div class="phpcode"><pre><span style="color: #000000">
|
||||
<span style="color: #0000BB"><?php<br />$matrix </span><span style="color: #007700">= </span><span style="color: #0000BB">imageaffinematrixget</span><span style="color: #007700">(</span><span style="color: #0000BB">IMG_AFFINE_TRANSLATE</span><span style="color: #007700">, array(</span><span style="color: #DD0000">'x' </span><span style="color: #007700">= </span><span style="color: #0000BB">2</span><span style="color: #007700">, </span><span style="color: #DD0000">'y' </span><span style="color: #007700">=> </span><span style="color: #0000BB">3</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$matrix</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span>
|
||||
</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
|
||||
<div class="example-contents"><p>以上例程会输出:</p></div>
|
||||
<div class="example-contents screen">
|
||||
<div class="cdata"><pre>
|
||||
Array
|
||||
(
|
||||
[0] => 1
|
||||
[1] => 0
|
||||
[2] => 0
|
||||
[3] => 1
|
||||
[4] => 2
|
||||
[5] => 3
|
||||
)
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="refsect1 seealso" id="refsect1-function.imageaffinematrixget-seealso">
|
||||
<h3 class="title">参见</h3>
|
||||
<p class="para">
|
||||
<ul class="simplelist">
|
||||
<li class="member"><span class="function"><a href="imageaffine.html" class="function" rel="rdfs-seeAlso">imageaffine()</a> - 返回经过仿射变换后的图像,剪切区域可选</span></li>
|
||||
<li class="member"><span class="function"><a href="imageaffinematrixconcat.html" class="function" rel="rdfs-seeAlso">imageaffinematrixconcat()</a> - Concatenate two affine transformation matrices</span></li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div></div></div></body></html>
|
||||
Reference in New Issue
Block a user