gtk.Curveallows direct editing of a curve.Synopsisgtk.Curvegtk.DrawingAreagtk.Curveresetset_gammagammaset_rangemin_xmax_xmin_ymax_yget_vectorsize-1set_vectorvectorset_curve_typetypeAncestry+-- gobject.GObject
+-- gtk.Object
+-- gtk.Widget
+-- gtk.DrawingArea
+-- gtk.Curve
Implemented Interfacesgtk.Curve
implements
gtk.Buildablegtk.Curve Propertiesgtk.Object Propertiesgtk.Widget Properties
"curve-type"Read/WriteThe curve type. One of linear
(gtk.CURVE_TYPE_LINEAR), spline interpolated
(gtk.CURVE_TYPE_SPLINE), or free-form
(gtk.CURVE_TYPE_FREE)."max-x"Read/WriteThe maximum possible value for X"max-y"Read/WriteThe maximum possible value for Y"min-x"Read/WriteThe minimum possible value for X"min-y"Read/WriteThe minimum possible value for Y
gtk.Curve Style Propertiesgtk.Widget Style Propertiesgtk.Curve Signal Prototypesgobject.GObject Signal Prototypesgtk.Object Signal Prototypesgtk.Widget Signal Prototypes"curve-type-changed"callbackcurvewidgetuser_param1...Descriptiongtk.Curve
is deprecated in GTK+ 2.20 and PyGTK 2.22 since it is too specialized.The gtk.Curve widget
allows the user to edit a curve covering a range of values. It is typically
used to fine-tune color balances in graphics applications like the
Gimp. The gtk.Curve widget has
3 modes of operation - spline, linear and free. In spline mode the user
places points on the curve which are automatically connected together into a
smooth curve. In linear mode the user places points on the curve which are
connected by straight lines. In free mode the user can draw the points of
the curve freely, and they are not connected at all.Constructorgtk.CurveReturns :a new gtk.Curve objectCreates a new gtk.Curve
objectMethodsgtk.Curve.resetresetThe reset() method resets the curve to
a straight line from the minimum x and y values to the maximum x and y
values (i.e. from the bottom-left to the top-right corners). The curve type
is not changed.gtk.Curve.set_gammaset_gammagammagamma :the gamma valueThe set_gamma() method recomputes the
entire curve using the value in gamma. A gamma value
of 1 results in a straight line. Values greater than 1 result in a curve
above the straight line. Values less than 1 result in a curve below the
straight line. The curve type is changed to
gtk.CURVE_TYPE_FREE.gtk.Curve.set_rangeset_rangemin_xmax_xmin_ymax_ymin_x :the new minimum x valuemax_x :the maximum x value.min_y :the new minimum y valuemax_y :the maximum y value.The set_range() method sets the
"min-x", "min-y", "max-x" and "max-y" properties from
min_x, min_y,
max_x, and max_y. The curve is also reset
with a call to reset().gtk.Curve.get_vectorget_vectorsize-1size :the number of points to return or -1 to return
all the points in the curve.Returns :a tuple containing the
pointsThe get_vector() method returns a tuple
of points representing the curve. The number of points to return is
specified by size; if size is
-1 all the points in the curve are returned.gtk.Curve.set_vectorset_vectorvectorvector :a list or tuple containing the points of the
curveThe set_vector() method sets the curve
using the points in vector. The curve type is set to
gtk.CURVE_TYPE_FREE.gtk.Curve.set_curve_typeset_curve_typetypetype :the new curve type:
gtk.CURVE_TYPE_LINEAR,
gtk.CURVE_TYPE_SPLINE or
gtk.CURVE_TYPE_FREEThe set_curve_type() method sets the
"curve-type" property with the value of type. The
curve type must be one of gtk.CURVE_TYPE_LINEAR,
gtk.CURVE_TYPE_SPLINE or
gtk.CURVE_TYPE_FREE. The curve will remain unchanged
except when changing from a free curve to a linear or spline curve, in which
case the curve will be changed as little as possible.SignalsThe "curve-type-changed" gtk.Curve Signalcallbackcurveuser_param1...curve :the curve that received the
signaluser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)The "curve-type-changed" signal is emitted when the curve type
has been changed. The curve type can be changed explicitly with a call to
set_curve_type().
It is also changed as a side-effect of calling reset() or
set_gamma()