php-doc-en/reference/image/functions/imagegetclip.xml
Christoph Michael Becker 6c9cb61806 Document imagesetclip() and imagegetclip()
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@340158 c90b9560-bf6c-de11-be94-00142212c4b1
2016-09-24 14:14:54 +00:00

110 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.imagegetclip" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>imagegetclip</refname>
<refpurpose>Get the clipping rectangle</refpurpose>
</refnamediv>
<refsect1 role="description"><!-- {{{ -->
&reftitle.description;
<methodsynopsis role="procedural">
<type>array</type><methodname>imagegetclip</methodname>
<!-- Example: Required parameter -->
<methodparam><type>resource</type><parameter>im</parameter></methodparam>
</methodsynopsis>
<para>
<function>imagegetclip</function> retrieves the current clipping rectangle,
i.e. the area beyond which no pixels will be drawn.
</para>
</refsect1><!-- }}} -->
<refsect1 role="parameters"><!-- {{{ -->
&reftitle.parameters;
<variablelist>
&gd.image.description;
</variablelist>
</refsect1><!-- }}} -->
<refsect1 role="returnvalues"><!-- {{{ -->
&reftitle.returnvalues;
<para>
The function returns an indexed array with the coordinates of the clipping
rectangle which has the following entries:
<itemizedlist>
<listitem>
<simpara>x-coordinate of the upper left corner</simpara>
</listitem>
<listitem>
<simpara>y-coordinate of the upper left corner</simpara>
</listitem>
<listitem>
<simpara>x-coordinate of the lower right corner</simpara>
</listitem>
<listitem>
<simpara>y-coordinate of the lower right corner</simpara>
</listitem>
</itemizedlist>
</para>
</refsect1><!-- }}} -->
<refsect1 role="examples"><!-- {{{ -->
&reftitle.examples;
<example xml:id="imagegetclip.example.basic"><!-- {{{ -->
<title><function>imagegetclip</function> example</title>
<para>
Setting and retrieving the clipping rectangle.
</para>
<programlisting role="php">
<![CDATA[
<?php
$im = imagecreate(100, 100);
imagesetclip($im, 10,10, 89,89);
print_r(imagegetclip($im));
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Array
(
[0] => 10
[1] => 10
[2] => 89
[3] => 89
)
]]>
</screen>
</example><!-- }}} -->
</refsect1><!-- }}} -->
<refsect1 role="seealso"><!-- {{{ -->
&reftitle.seealso;
<simplelist>
<member><function>imagesetclip</function></member>
</simplelist>
</refsect1><!-- }}} -->
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->