<?xml version="1.0"?>
<page id="Gimp.Item.transform_2d"
      type="topic"
      style="method"
      xmlns="http://projectmallard.org/1.0/"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/1.0/ui/">
  <info>
    <link xref="Gimp.Item" group="method" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>Gimp.Item</api:type>
      </api:returns>
      <api:name>gimp_item_transform_2d</api:name>
      <api:arg>
        <api:type>Number(gdouble)</api:type>
        <api:name>source_x</api:name>
      </api:arg>
      <api:arg>
        <api:type>Number(gdouble)</api:type>
        <api:name>source_y</api:name>
      </api:arg>
      <api:arg>
        <api:type>Number(gdouble)</api:type>
        <api:name>scale_x</api:name>
      </api:arg>
      <api:arg>
        <api:type>Number(gdouble)</api:type>
        <api:name>scale_y</api:name>
      </api:arg>
      <api:arg>
        <api:type>Number(gdouble)</api:type>
        <api:name>angle</api:name>
      </api:arg>
      <api:arg>
        <api:type>Number(gdouble)</api:type>
        <api:name>dest_x</api:name>
      </api:arg>
      <api:arg>
        <api:type>Number(gdouble)</api:type>
        <api:name>dest_y</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>Gimp.Item.prototype.transform_2d</title>
  <synopsis><code mime="text/x-gjs">
function transform_2d(source_x: Number(gdouble), source_y: Number(gdouble), scale_x: Number(gdouble), scale_y: Number(gdouble), angle: Number(gdouble), dest_x: Number(gdouble), dest_y: Number(gdouble)): <link xref="Gimp.Item">Gimp.Item</link> {
    // Gjs wrapper for gimp_item_transform_2d()
}
  </code></synopsis>
  <p>Transform the specified item in 2d.</p>  <p>This procedure transforms the specified item.</p>  <p>The transformation is done by scaling by the x and y scale factors
about the point (source_x, source_y), then rotating around the same
point, then translating that point to the new position (dest_x,
dest_y).</p>  <p>If a selection exists and the item is a drawable, the portion of the
drawable which lies under the selection is cut from the drawable and
made into a floating selection which is then transformed as
specified. The return value is the ID of the transformed floating
selection.</p>  <p>If there is no selection or the item is not a drawable, the entire
item will be transformed according to the specified parameters.
The return value will be equal to the item ID supplied as input.</p>  <p>This procedure is affected by the following context setters:
<link xref="Gimp.context_set_interpolation"/>,
<link xref="Gimp.context_set_transform_direction"/>,
<link xref="Gimp.context_set_transform_resize"/>.</p>
  <p>Since 2.8</p>
<terms>
<item>
<title><code>source_x</code></title>
  <p>X coordinate of the transformation center.</p>
</item>
<item>
<title><code>source_y</code></title>
  <p>Y coordinate of the transformation center.</p>
</item>
<item>
<title><code>scale_x</code></title>
  <p>Amount to scale in x direction.</p>
</item>
<item>
<title><code>scale_y</code></title>
  <p>Amount to scale in y direction.</p>
</item>
<item>
<title><code>angle</code></title>
  <p>The angle of rotation (radians).</p>
</item>
<item>
<title><code>dest_x</code></title>
  <p>X coordinate of where the center goes.</p>
</item>
<item>
<title><code>dest_y</code></title>
  <p>Y coordinate of where the center goes.</p>
</item>
<item>
<title><code>Returns</code></title>
  <p>The transformed item.</p>
</item>
</terms>

</page>
