Class Index | Cross Index | Namespace Index |
Allows direct editing of a curve.
Contained in: Gtk
Derived from:
Gtk::DrawingArea
Derived by:
none
#include <gtk--/curve.h>
public function member index: |
||
Curve | (); | |
signal void | curve_type_changed | (); |
void | get_vector | (int num, gfloat* data); |
GtkCurve* | gtkobj | (); |
const GtkCurve* | gtkobj | () const; |
static bool | isA | (Object* object); |
void | reset | (); |
void | set_curve_type | (GtkCurveType type); |
void | set_gamma | (gfloat gamma); |
void | set_range | (gfloat min_x, gfloat max_x, gfloat min_y, gfloat max_y); |
void | set_vector | (const CurveArray& vect); |
virtual | ~Curve | (); |
protected function member index: |
||
virtual void | curve_type_changed_impl | (); |
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.
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.
data: Returns the points.
Resets the curve to a straight line from the minimum x & y values to the maximum x & y values (i.e. from the bottom-left to the top-right corners). The curve type is not changed.
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. type: The type of the curve. Possible values are: GTK_CURVE_TYPE_LINEAR, GTK_CURVE_TYPE_SPLINE, GTK_CURVE_TYPE_FREE.
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.gamma: The gamma value.
The curve is also reset with a call to .min_x: The minimum x value.
max_x: The maximum x value.
min_y: The minimum y value.
max_y: The maximum y value.
The curve type is set to GTK_CURVE_TYPE_FREE.vect: The points on the curve.