set_ratio


Description:

[ CCode ( cname = "gimp_number_pair_entry_set_ratio" ) ]
[ Version ( since = "2.4" ) ]
public void set_ratio (double ratio)

Sets the numbers of the NumberPairEntry to have the desired ratio.

If the new ratio is different than the previous ratio, the "ratio-changed" signal is emitted.

An attempt is made to convert the decimal number into a fraction with left_number and right_number < 1000.

Parameters:

this

A NumberPairEntry widget.

ratio

Ratio to set in the widget.