<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.image.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.imagesetclip.php',
    1 => 'imagesetclip',
    2 => 'Set the clipping rectangle',
  ),
  'up' => 
  array (
    0 => 'ref.image.php',
    1 => 'GD 和图像处理 函数',
  ),
  'prev' => 
  array (
    0 => 'function.imagesetbrush.php',
    1 => 'imagesetbrush',
  ),
  'next' => 
  array (
    0 => 'function.imagesetinterpolation.php',
    1 => 'imagesetinterpolation',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/image/functions/imagesetclip.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.imagesetclip" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imagesetclip</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.2.0, PHP 8)</p><p class="refpurpose"><span class="refname">imagesetclip</span> &mdash; <span class="dc-title">Set the clipping rectangle</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.imagesetclip-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>imagesetclip</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="class.gdimage.php" class="type GdImage">GdImage</a></span> <code class="parameter">$image</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$x1</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$y1</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$x2</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$y2</code></span><br>): <span class="type"><a href="language.types.singleton.php" class="type true">true</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>imagesetclip()</strong></span> sets the current clipping rectangle, i.e.
   the area beyond which no pixels will be drawn.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.imagesetclip-parameters">
  <h3 class="title">参数</h3>
  <dl>
   <dt>
<code class="parameter">image</code></dt><dd><p class="para">由图象创建函数(例如<span class="function"><a href="function.imagecreatetruecolor.php" class="function">imagecreatetruecolor()</a></span>)返回的 
<span class="classname"><a href="class.gdimage.php" class="classname">GdImage</a></span> 对象。</p></dd>
   
    <dt><code class="parameter">x1</code></dt>
    <dd>
     <p class="para">
      The x-coordinate of the upper left corner.
     </p>
    </dd>
   
   
    <dt><code class="parameter">y1</code></dt>
    <dd>
     <p class="para">
      The y-coordinate of the upper left corner.
     </p>
    </dd>
   
   
    <dt><code class="parameter">x2</code></dt>
    <dd>
     <p class="para">
      The x-coordinate of the lower right corner.
     </p>
    </dd>
   
   
    <dt><code class="parameter">y2</code></dt>
    <dd>
     <p class="para">
      The y-coordinate of the lower right corner.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.imagesetclip-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   总是返回 <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.imagesetclip-changelog">
  <h3 class="title">更新日志</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>版本</th>
      <th>说明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.0.0</td>
 <td>
  <code class="parameter">image</code> 现在需要 <span class="classname"><a href="class.gdimage.php" class="classname">GdImage</a></span> 实例；之前需要有效的 <code class="literal">gd</code> <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>。
 </td>
</tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.imagesetclip-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.imagegetclip.php" class="function" rel="rdfs-seeAlso">imagegetclip()</a> - Get the clipping rectangle</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>