<?xml version="1.0"?>
<page id="Gimp.Image.select_polygon"
      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.Image" group="method" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>Boolean</api:type>
      </api:returns>
      <api:name>gimp_image_select_polygon</api:name>
      <api:arg>
        <api:type>Gimp.ChannelOps</api:type>
        <api:name>operation</api:name>
      </api:arg>
      <api:arg>
        <api:type>Array(Number(gdouble))</api:type>
        <api:name>segs</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>Gimp.Image.prototype.select_polygon</title>
  <synopsis><code mime="text/x-gjs">
function select_polygon(operation: <link xref="Gimp.ChannelOps">Gimp.ChannelOps</link>, segs: Array(Number(gdouble))): Boolean {
    // Gjs wrapper for gimp_image_select_polygon()
}
  </code></synopsis>
  <p>Create a polygonal selection over the specified image.</p>  <p>This tool creates a polygonal selection over the specified image.
The polygonal region can be either added to, subtracted from, or
replace the contents of the previous selection mask. The polygon is
specified through an array of floating point numbers and its length.
The length of array must be 2n, where n is the number of points.
Each point is defined by 2 floating point values which correspond to
the x and y coordinates. If the final point does not connect to the
starting point, a connecting segment is automatically added.</p>  <p>This procedure is affected by the following context setters:
<link xref="Gimp.context_set_antialias"/>, <link xref="Gimp.context_set_feather"/>,
<link xref="Gimp.context_set_feather_radius"/>.</p>
  <p>Since 2.8</p>
<terms>
<item>
<title><code>operation</code></title>
  <p>The selection operation.</p>
</item>
<item>
<title><code>segs</code></title>
  <p>Array of points: { p1.x, p1.y, p2.x, p2.y, ..., pn.x, pn.y}.</p>
</item>
<item>
<title><code>Returns</code></title>
  <p>TRUE on success.</p>
</item>
</terms>

</page>
