<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagick.shearimage">
 <refnamediv>
  <refname>Imagick::shearImage</refname>
  <refpurpose>Creating a parallelogram</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>public</modifier> <type>bool</type><methodname>Imagick::shearImage</methodname>
   <methodparam><type>mixed</type><parameter>background</parameter></methodparam>
   <methodparam><type>float</type><parameter>x_shear</parameter></methodparam>
   <methodparam><type>float</type><parameter>y_shear</parameter></methodparam>
  </methodsynopsis>
  <para>
   Slides one edge of an image along the X or Y axis, creating a parallelogram.
   An X direction shear slides an edge along the X axis, while a Y direction
   shear slides an edge along the Y axis.  The amount of the shear is controlled
   by a shear angle.  For X direction shears, x_shear is measured relative to
   the Y axis, and similarly, for Y direction shears y_shear is measured
   relative to the X axis.  Empty triangles left over from shearing the image
   are filled with the background color.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>background</parameter></term>
     <listitem>
      <para>
       The background color
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>x_shear</parameter></term>
     <listitem>
      <para>
       The number of degrees to shear on the x axis
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>y_shear</parameter></term>
     <listitem>
      <para>
       The number of degrees to shear on the y axis
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &imagick.return.success;
  </para>
 </refsect1>

 <refsect1 role="changelog">
  &reftitle.changelog;
  <para>
   <informaltable>
    <tgroup cols="2">
     <thead>
      <row>
       <entry>&Version;</entry>
       <entry>&Description;</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry>PECL imagick 2.1.0</entry>
       <entry>
        Now allows a string representing the color as the first parameter.
        Previous versions allow only an ImagickPixel object.
       </entry>
      </row>
     </tbody>
    </tgroup>
   </informaltable>
  </para>
 </refsect1>



 <refsect1 role="examples">
  &reftitle.examples;
  <para>
    <example>
      <title> <function>Imagick::shearImage</function></title>
      <programlisting role="php">
      <![CDATA[
<?php
function shearImage($imagePath, $color, $shearX, $shearY) {
    $imagick = new \Imagick(realpath($imagePath));
    $imagick->shearimage($color, $shearX, $shearY);
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}

?>
]]>
      </programlisting>
    </example>
  </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:"~/.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
-->
