<?xml version="1.0"?>
<page id="Gimp.Gradient.segment_set_middle_pos"
      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.Gradient" group="method" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>bool</api:type>
      </api:returns>
      <api:name>gimp_gradient_segment_set_middle_pos</api:name>
      <api:arg>
        <api:type>Gimp.Gradient</api:type>
        <api:name>self</api:name>
      </api:arg>
      <api:arg>
        <api:type>int</api:type>
        <api:name>segment</api:name>
      </api:arg>
      <api:arg>
        <api:type>float</api:type>
        <api:name>pos</api:name>
      </api:arg>
      <api:arg>
        <api:type>float</api:type>
        <api:name>final_pos</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>Gimp.Gradient.segment_set_middle_pos</title>
  <synopsis><code mime="text/x-python">
@accepts(Gimp.Gradient, int, float, float)
@returns(bool)
def segment_set_middle_pos(self, segment, pos, final_pos):
    # Python wrapper for gimp_gradient_segment_set_middle_pos()
  </code></synopsis>
  <p>Sets the midpoint position of the segment</p>  <p>Sets the midpoint position of the segment of the gradient. The final
position will be the given fraction between the two endpoints of the
segment.
Returns the final position. Returns an error when gradient is not
editable or segment index is out of range.</p>
  <p>Since 2.2</p>
<terms>
<item>
<title><code>self</code></title>
  <p>The gradient.</p>
</item>
<item>
<title><code>segment</code></title>
  <p>The index of a segment within the gradient.</p>
</item>
<item>
<title><code>pos</code></title>
  <p>The position to set the guidepoint to.</p>
</item>
<item>
<title><code>final_pos</code></title>
  <p>The return position.</p>
</item>
<item>
<title><code>Returns</code></title>
{formatter.format(node, node.retval.doc)}
</item>
</terms>

</page>
