<?xml version="1.0"?>
<page id="Gimp.Vectors.stroke_new_from_points"
      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.Vectors" group="method" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>Number(gint)</api:type>
      </api:returns>
      <api:name>gimp_vectors_stroke_new_from_points</api:name>
      <api:arg>
        <api:type>Gimp.VectorsStrokeType</api:type>
        <api:name>type</api:name>
      </api:arg>
      <api:arg>
        <api:type>Array(Number(gdouble))</api:type>
        <api:name>controlpoints</api:name>
      </api:arg>
      <api:arg>
        <api:type>Boolean</api:type>
        <api:name>closed</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>Gimp.Vectors.prototype.stroke_new_from_points</title>
  <synopsis><code mime="text/x-gjs">
function stroke_new_from_points(type: <link xref="Gimp.VectorsStrokeType">Gimp.VectorsStrokeType</link>, controlpoints: Array(Number(gdouble)), closed: Boolean): Number(gint) {
    // Gjs wrapper for gimp_vectors_stroke_new_from_points()
}
  </code></synopsis>
  <p>Adds a stroke of a given type to the vectors object.</p>  <p>Adds a stroke of a given type to the vectors object. The coordinates
of the control points can be specified. For now only strokes of the
type GIMP_VECTORS_STROKE_TYPE_BEZIER are supported. The control
points are specified as a pair of float values for the x- and
y-coordinate. The Bezier stroke type needs a multiple of three
control points. Each Bezier segment endpoint (anchor, A) has two
additional control points (C) associated. They are specified in the
order CACCACCAC...</p>
  <p>Since 2.4</p>
<terms>
<item>
<title><code>type</code></title>
  <p>type of the stroke (always GIMP_VECTORS_STROKE_TYPE_BEZIER for now).</p>
</item>
<item>
<title><code>controlpoints</code></title>
  <p>List of the x- and y-coordinates of the control points.</p>
</item>
<item>
<title><code>closed</code></title>
  <p>Whether the stroke is to be closed or not.</p>
</item>
<item>
<title><code>Returns</code></title>
  <p>The stroke ID of the newly created stroke.</p>
</item>
</terms>

</page>
