1 2@c %start of fragment 3 4@deftp Class <gtk-curve> 5Derives from @code{<gtk-drawing-area>}. 6 7This class defines the following slots: 8 9@table @code 10@item curve-type 11Is this curve linear, spline interpolated, or free-form 12 13@item min-x 14Minimum possible value for X 15 16@item max-x 17Maximum possible X value 18 19@item min-y 20Minimum possible value for Y 21 22@item max-y 23Maximum possible value for Y 24 25@end table 26 27@end deftp 28 29@defop Signal <gtk-curve> curve-type-changed 30Emitted when the curve type has been changed. The curve type can be changed 31explicitly with a call to @code{gtk-curve-set-curve-type}. It is also changed as 32a side-effect of calling @code{gtk-curve-reset} or @code{gtk-curve-set-gamma}. 33 34@end defop 35 36@deffn Function gtk-curve-new @result{}@tie{} (ret@tie{}@code{<gtk-widget>}) 37Creates a new @code{<gtk-curve>}. 38 39@table @var 40@item ret 41a new @code{<gtk-curve>}. 42 43@end table 44 45@end deffn 46 47@deffn Function gtk-curve-reset (self@tie{}@code{<gtk-curve>}) 48@deffnx Method reset 49Resets the curve to a straight line from the minimum x and y values to the 50maximum x and y values (i.e. from the bottom-left to the top-right corners). The 51curve type is not changed. 52 53@table @var 54@item curve 55a @code{<gtk-curve>}. 56 57@end table 58 59@end deffn 60 61@deffn Function gtk-curve-set-gamma (self@tie{}@code{<gtk-curve>}) (gamma@tie{}@code{float}) 62@deffnx Method set-gamma 63Recomputes the entire curve using the given gamma value. A gamma value of 1 64results in a straight line. Values greater than 1 result in a curve above the 65straight line. Values less than 1 result in a curve below the straight line. The 66curve type is changed to @samp{GTK_CURVE_TYPE_FREE}. FIXME: Needs a more precise 67definition of gamma. 68 69@table @var 70@item curve 71a @code{<gtk-curve>}. 72 73@item gamma 74the gamma value. 75 76@end table 77 78@end deffn 79 80@deffn Function gtk-curve-set-range (self@tie{}@code{<gtk-curve>}) (min_x@tie{}@code{float}) (max_x@tie{}@code{float}) (min_y@tie{}@code{float}) (max_y@tie{}@code{float}) 81@deffnx Method set-range 82Sets the minimum and maximum x and y values of the curve. The curve is also 83reset with a call to @code{gtk-curve-reset}. 84 85@table @var 86@item curve 87a @code{<gtk-curve>}. 88 89@item min-x 90the minimum x value. 91 92@item max-x 93the maximum x value. 94 95@item min-y 96the minimum y value. 97 98@item max-y 99the maximum y value. 100 101@end table 102 103@end deffn 104 105 106@c %end of fragment 107