GwyCurve — Widget that displays editable curves
GtkWidget * | gwy_curve_new () |
void | gwy_curve_reset () |
void | gwy_curve_set_range () |
void | gwy_curve_set_curve_type () |
void | gwy_curve_set_channels () |
void | gwy_curve_set_control_points () |
void | gwy_curve_get_control_points () |
GwyCurveType | curve-type | Read / Write |
float | max-x | Read / Write |
float | max-y | Read / Write |
float | min-x | Read / Write |
float | min-y | Read / Write |
gboolean | snap | Read / Write |
void | curve-edited | Run First |
void | curve-type-changed | Run First |
typedef | GwyPoint |
GwyChannelData | |
struct | GwyCurve |
struct | GwyCurveClass |
GObject ╰── GInitiallyUnowned ╰── GtkObject ╰── GtkWidget ╰── GtkDrawingArea ╰── GwyCurve
GwyCurve implements AtkImplementorIface and GtkBuildable.
#include <libgwydgets/gwydgets.h>
GwyCurve is a widget that can display multiple curves. The user can edit these curves by clicking and dragging control points. New control points are created when a user clicks on a part of a curve where there are no control points. Control points can be deleted by dragging ontop of another control point.
GtkWidget *
gwy_curve_new (void
);
Creates GwyCurve widget. By default, the widget will have 3 curves.
new GwyCurve widget.
void
gwy_curve_reset (GwyCurve *curve
);
Removes all control points, resetting the curves to their initial state.
curve |
a GwyCurve widget. |
void gwy_curve_set_range (GwyCurve *curve
,gdouble min_x
,gdouble max_x
,gdouble min_y
,gdouble max_y
);
void gwy_curve_set_curve_type (GwyCurve *curve
,GwyCurveType type
);
void gwy_curve_set_channels (GwyCurve *curve
,gint num_channels
,GwyRGBA *colors
);
void gwy_curve_set_control_points (GwyCurve *curve
,GwyChannelData *channel_data
,gboolean prune
);
void gwy_curve_get_control_points (GwyCurve *curve
,GwyChannelData *channel_data
,gboolean triplets
);
typedef GwyXY GwyPoint;
typedef struct { /* curve points: */ gint num_points; GwyPoint *points; /* control points: */ gint num_ctlpoints; GwyPoint *ctlpoints; GwyRGBA color; } GwyChannelData;
struct GwyCurve;
struct GwyCurveClass { GtkDrawingAreaClass parent_class; /* Signals */ void (*curve_type_changed)(GwyCurve *curve); void (*curve_edited)(GwyCurve *curve); /* Padding for future expansion */ void (*_gwy_reserved1) (void); void (*_gwy_reserved2) (void); void (*_gwy_reserved3) (void); void (*_gwy_reserved4) (void); };
“curve-type”
property“curve-type” GwyCurveType
Is this curve linear, spline interpolated, or free-form.
Owner: GwyCurve
Flags: Read / Write
Default value: GWY_CURVE_TYPE_LINEAR
“max-x”
property“max-x” float
Maximum possible X value.
Owner: GwyCurve
Flags: Read / Write
Default value: 1
“max-y”
property“max-y” float
Maximum possible value for Y.
Owner: GwyCurve
Flags: Read / Write
Default value: 1
“min-x”
property“min-x” float
Minimum possible value for X.
Owner: GwyCurve
Flags: Read / Write
Default value: 0
“min-y”
property“min-y” float
Minimum possible value for Y.
Owner: GwyCurve
Flags: Read / Write
Default value: 0
“snap”
property“snap” gboolean
Snap to control points mode.
Owner: GwyCurve
Flags: Read / Write
Default value: TRUE
“curve-edited”
signalvoid user_function (GwyCurve *gwycurve, gpointer user_data)
Flags: Run First
“curve-type-changed”
signalvoid user_function (GwyCurve *gwycurve, gpointer user_data)
Flags: Run First