<?xml version="1.0"?>
<page id="GimpUi.NumberPairEntry.set_ratio"
      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="GimpUi.NumberPairEntry" group="method" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>none</api:type>
      </api:returns>
      <api:name>gimp_number_pair_entry_set_ratio</api:name>
      <api:arg>
        <api:type>GimpUi.NumberPairEntry</api:type>
        <api:name>self</api:name>
      </api:arg>
      <api:arg>
        <api:type>float</api:type>
        <api:name>ratio</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>GimpUi.NumberPairEntry.set_ratio</title>
  <synopsis><code mime="text/x-python">
@accepts(GimpUi.NumberPairEntry, float)
@returns(none)
def set_ratio(self, ratio):
    # Python wrapper for gimp_number_pair_entry_set_ratio()
  </code></synopsis>
  <p>Sets the numbers of the <link xref="GimpUi.NumberPairEntry"/> to have the desired
ratio. If the new ratio is different than the previous ratio, the
"ratio-changed" signal is emitted.</p>  <p>An attempt is made to convert the decimal number into a fraction
with left_number and right_number &lt; 1000.</p>
  <p>Since 2.4</p>
<terms>
<item>
<title><code>self</code></title>
  <p>A <link xref="GimpUi.NumberPairEntry"/> widget.</p>
</item>
<item>
<title><code>ratio</code></title>
  <p>Ratio to set in the widget.</p>
</item>
</terms>

</page>
