<?xml version="1.0"?>
<page id="Gimp.gradient_get_custom_samples"
      type="topic"
      style="function"
      xmlns="http://projectmallard.org/1.0/"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/1.0/ui/">
  <info>
    <link xref="index" group="function" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>bool</api:type>
      </api:returns>
      <api:name>gimp_gradient_get_custom_samples</api:name>
      <api:arg>
        <api:type>unicode</api:type>
        <api:name>name</api:name>
      </api:arg>
      <api:arg>
        <api:type>int</api:type>
        <api:name>num_samples</api:name>
      </api:arg>
      <api:arg>
        <api:type>[float]</api:type>
        <api:name>positions</api:name>
      </api:arg>
      <api:arg>
        <api:type>bool</api:type>
        <api:name>reverse</api:name>
      </api:arg>
      <api:arg>
        <api:type>int</api:type>
        <api:name>num_color_samples</api:name>
      </api:arg>
      <api:arg>
        <api:type>[float]</api:type>
        <api:name>color_samples</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>Gimp.gradient_get_custom_samples</title>
  <synopsis><code mime="text/x-python">
@accepts(unicode, int, [float], bool, int, [float])
@returns(bool)
def gradient_get_custom_samples(name, num_samples, positions, reverse, num_color_samples, color_samples):
    # Python wrapper for gimp_gradient_get_custom_samples()
  </code></synopsis>
  <p>Sample the specified gradient in custom positions.</p>  <p>This procedure samples the active gradient in the specified number
of points. The procedure will sample the gradient in the specified
positions from the list. The left endpoint of the gradient
corresponds to position 0.0, and the right endpoint corresponds to
1.0. The procedure returns a list of floating-point values which
correspond to the RGBA values for each sample.</p>
  <p>Since 2.2</p>
<terms>
<item>
<title><code>name</code></title>
  <p>The gradient name.</p>
</item>
<item>
<title><code>num_samples</code></title>
  <p>The number of samples to take.</p>
</item>
<item>
<title><code>positions</code></title>
  <p>The list of positions to sample along the gradient.</p>
</item>
<item>
<title><code>reverse</code></title>
  <p>Use the reverse gradient.</p>
</item>
<item>
<title><code>num_color_samples</code></title>
  <p>Length of the color_samples array (4 * num_samples).</p>
</item>
<item>
<title><code>color_samples</code></title>
  <p>Color samples: { R1, G1, B1, A1, ..., Rn, Gn, Bn, An }.</p>
</item>
<item>
<title><code>Returns</code></title>
{formatter.format(node, node.retval.doc)}
</item>
</terms>

</page>
