]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkcurve.sgml
=== Released 2.3.3 ===
[~andy/gtk] / docs / reference / gtk / tmpl / gtkcurve.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkCurve
3
4 <!-- ##### SECTION Short_Description ##### -->
5 allows direct editing of a curve.
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <note>
9 <para>
10  This widget is considered too specialized/little-used for
11  GTK+, and will in the future be moved to some other package.  If
12  your application needs this widget, feel free to use it, as the
13  widget does work and is useful in some applications; it's just not
14  of general interest. However, we are not accepting new features for
15  the widget, and it will eventually move out of the GTK+
16  distribution.
17 </para>
18 </note>
19 <para>
20 The #GtkCurve widget allows the user to edit a curve covering a range of
21 values. It is typically used to fine-tune color balances in graphics
22 applications like the Gimp.
23 </para>
24 <para>
25 The #GtkCurve widget has 3 modes of operation - spline, linear and free.
26 In spline mode the user places points on the curve which are automatically
27 connected together into a smooth curve. In linear mode the user places points
28 on the curve which are connected by straight lines. In free mode the user can
29 draw the points of the curve freely, and they are not connected at all.
30 </para>
31
32 <!-- ##### SECTION See_Also ##### -->
33 <para>
34 <variablelist>
35 <varlistentry>
36 <term>#GtkGammaCurve</term>
37 <listitem><para>a subclass for editing gamma curves.</para>
38 </listitem>
39 </varlistentry>
40 </variablelist>
41
42 </para>
43
44 <!-- ##### STRUCT GtkCurve ##### -->
45 <para>
46 The #GtkCurve-struct struct contains private data only, and
47 should be accessed using the functions below.
48 </para>
49
50
51 <!-- ##### SIGNAL GtkCurve::curve-type-changed ##### -->
52 <para>
53 Emitted when the curve type has been changed.
54 The curve type can be changed explicitly with a call to
55 gtk_curve_set_curve_type(). It is also changed as a side-effect of
56 calling gtk_curve_reset() or gtk_curve_set_gamma().
57 </para>
58
59 @curve: the object which received the signal.
60
61 <!-- ##### ARG GtkCurve:curve-type ##### -->
62 <para>
63
64 </para>
65
66 <!-- ##### ARG GtkCurve:max-x ##### -->
67 <para>
68
69 </para>
70
71 <!-- ##### ARG GtkCurve:max-y ##### -->
72 <para>
73
74 </para>
75
76 <!-- ##### ARG GtkCurve:min-x ##### -->
77 <para>
78
79 </para>
80
81 <!-- ##### ARG GtkCurve:min-y ##### -->
82 <para>
83
84 </para>
85
86 <!-- ##### FUNCTION gtk_curve_new ##### -->
87 <para>
88 Creates a new #GtkCurve.
89 </para>
90
91 @Returns: a new #GtkCurve.
92
93
94 <!-- ##### FUNCTION gtk_curve_reset ##### -->
95 <para>
96 Resets the curve to a straight line from the minimum x and y values to the
97 maximum x and y values (i.e. from the bottom-left to the top-right corners).
98 The curve type is not changed.
99 </para>
100
101 @curve: a #GtkCurve.
102
103
104 <!-- ##### FUNCTION gtk_curve_set_gamma ##### -->
105 <para>
106 Recomputes the entire curve using the given gamma value.
107 A gamma value of 1 results in a straight line. Values greater than 1 result
108 in a curve above the straight line. Values less than 1 result in a curve
109 below the straight line. The curve type is changed to %GTK_CURVE_TYPE_FREE.
110 FIXME: Needs a more precise definition of gamma.
111 </para>
112
113 @curve: a #GtkCurve.
114 @gamma_: the gamma value.
115
116
117 <!-- ##### FUNCTION gtk_curve_set_range ##### -->
118 <para>
119 Sets the minimum and maximum x and y values of the curve.
120 The curve is also reset with a call to gtk_curve_reset().
121 </para>
122
123 @curve: a #GtkCurve.
124 @min_x: the minimum x value.
125 @max_x: the maximum x value.
126 @min_y: the minimum y value.
127 @max_y: the maximum y value.
128
129
130 <!-- ##### FUNCTION gtk_curve_get_vector ##### -->
131 <para>
132 Returns a vector of points representing the curve.
133 </para>
134
135 @curve: a #GtkCurve.
136 @veclen: the number of points to calculate.
137 @vector: returns the points.
138
139
140 <!-- ##### FUNCTION gtk_curve_set_vector ##### -->
141 <para>
142 Sets the vector of points on the curve.
143 The curve type is set to %GTK_CURVE_TYPE_FREE.
144 </para>
145
146 @curve: a #GtkCurve.
147 @veclen: the number of points.
148 @vector: the points on the curve.
149
150
151 <!-- ##### FUNCTION gtk_curve_set_curve_type ##### -->
152 <para>
153 Sets the type of the curve. The curve will remain unchanged except when
154 changing from a free curve to a linear or spline curve, in which case the
155 curve will be changed as little as possible.
156 </para>
157
158 @curve: a #GtkCurve.
159 @type: the type of the curve.
160
161