Added Imagick::distortImage documentation and distortion method constants.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@243711 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mikko Koppanen 2007-10-06 16:01:57 +00:00
parent 1216f064fa
commit 81dc6a8b45
3 changed files with 256 additions and 3 deletions

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.11 $ -->
<!-- $Revision: 1.12 $ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagick.constants">
<refnamediv>
<refname>Constants</refname>
@ -2951,7 +2951,7 @@
</listitem>
</varlistentry>
</variablelist>
<variablelist xml:id="imagick.constants.orientation">
<variablelist xml:id="imagick.constants.orientation">
<title>Orientation constants (available if compiled against ImageMagick 6.3.4 or later)</title>
<varlistentry>
<term>
@ -3053,6 +3053,103 @@
</listitem>
</varlistentry>
</variablelist>
<variablelist xml:id="imagick.constants.distortion">
<title>Orientation constants (available if compiled against ImageMagick 6.3.6 or later)</title>
<varlistentry>
<term>
<constant>imagick::DISTORTION_UNDEFINED</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>imagick::DISTORTION_AFFINE</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>imagick::DISTORTION_AFFINEPROJECTION</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>imagick::DISTORTION_ARC</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>imagick::DISTORTION_BILINEAR</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>imagick::DISTORTION_PERSPECTIVE</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>imagick::DISTORTION_PERSPECTIVEPROJECTION</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>imagick::DISTORTION_SCALEROTATETRANSLATE</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.17 $ -->
<!-- $Revision: 1.18 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc.
-->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagick.imagick">
@ -1115,6 +1115,7 @@
&reference.imagick.imagick.mosaicimages;
&reference.imagick.imagick.motionblurimage;
&reference.imagick.imagick.negateimage;
&reference.imagick.imagick.distortimage;
&reference.imagick.imagick.newimage;
&reference.imagick.imagick.setimage;
&reference.imagick.imagick.setimageopacity;

View file

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.imagick-distortimage">
<refnamediv>
<refname>Imagick::distortImage</refname>
<refpurpose>Distorts an image using various distortion methods</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>Imagick::distortImage</methodname>
<methodparam><type>int</type><parameter>method</parameter></methodparam>
<methodparam><type>array</type><parameter>arguments</parameter></methodparam>
<methodparam><type>bool</type><parameter>bestfit</parameter></methodparam>
</methodsynopsis>
&warn.experimental.func;
<para>
Distorts an image using various distortion methods, by mapping color lookups of the source
image to a new destination image usally of the same size as the source image, unless 'bestfit' is set to true.
If 'bestfit' is enabled, and distortion allows it, the destination image is adjusted to ensure the whole source 'image' will just fit within the final destination image, which will be sized and offset accordingly. Also in many cases the virtual offset of the source image will be taken into account in the mapping.
This functionality is present if Imagick is compiled against ImageMagick 6.3.6 or later.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>method</parameter></term>
<listitem>
<para>
The method of image distortion. See <link linkend="imagick.constants.distortion">distortion constants</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>arguments</parameter></term>
<listitem>
<para>
The arguments for this distortion method
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>bestfit</parameter></term>
<listitem>
<para>
Attempt to resize destination to fit distorted source
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&imagick.return.success;
</para>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
<para>
&imagick.imagick.throws;
</para>
</refsect1>
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Using <function>Imagick::distortImage</function>:</title>
<para>
Distort an image and write it to the disk.
</para>
<programlisting role="php">
<![CDATA[
<?php
$im = new imagick( "example.jpg" );
$im->distortImage( Imagick::DISTORTION_PERSPECTIVE, array( 7,40, 4,30, 4,124, 4,123, 85,122, 100,123, 85,2, 100,30 ), true );
$im->writeImage( "example_out.jpg" );
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>Imagick::blurImage</function></member>
<member><function>Imagick::motionBlurImage</function></member>
<member><function>Imagick::radialBlurImage</function></member>
</simplelist>
</para>
</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:"../../../../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
-->