summaryrefslogtreecommitdiff
path: root/docs/reference/gtk/tmpl/gtkcurve.sgml
blob: 39157b2faeb0cd6627844e16181d1001dca0dd0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!-- ##### SECTION Title ##### -->
GtkCurve

<!-- ##### SECTION Short_Description ##### -->
Allows direct editing of a curve

<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkCurve 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.
</para>
<para>
The #GtkCurve 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.
</para>
<para>
As of GTK+ 2.20, #GtkCurve has been deprecated since it is too specialized.
</para>

<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term>#GtkGammaCurve</term>
<listitem><para>a subclass for editing gamma curves.</para>
</listitem>
</varlistentry>
</variablelist>

</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### SECTION Image ##### -->


<!-- ##### STRUCT GtkCurve ##### -->
<para>
The #GtkCurve-struct struct contains private data only, and
should be accessed using the functions below.
</para>


<!-- ##### SIGNAL GtkCurve::curve-type-changed ##### -->
<para>
Emitted when the curve type has been changed.
The curve type can be changed explicitly with a call to
gtk_curve_set_curve_type(). It is also changed as a side-effect of
calling gtk_curve_reset() or gtk_curve_set_gamma().
</para>

@curve: the object which received the signal.

<!-- ##### ARG GtkCurve:curve-type ##### -->
<para>

</para>

<!-- ##### ARG GtkCurve:max-x ##### -->
<para>

</para>

<!-- ##### ARG GtkCurve:max-y ##### -->
<para>

</para>

<!-- ##### ARG GtkCurve:min-x ##### -->
<para>

</para>

<!-- ##### ARG GtkCurve:min-y ##### -->
<para>

</para>

<!-- ##### FUNCTION gtk_curve_new ##### -->
<para>
Creates a new #GtkCurve.
</para>

@void: 
@Returns: a new #GtkCurve.
@Deprecated: 2.20: Don't use this widget anymore.


<!-- ##### FUNCTION gtk_curve_reset ##### -->
<para>
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.
</para>

@curve: a #GtkCurve.
@Deprecated: 2.20: Don't use this widget anymore.


<!-- ##### FUNCTION gtk_curve_set_gamma ##### -->
<para>
Recomputes the entire curve using the given gamma value.
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.
FIXME: Needs a more precise definition of gamma.
</para>

@curve: a #GtkCurve.
@gamma_: the gamma value.
@Deprecated: 2.20: Don't use this widget anymore.


<!-- ##### FUNCTION gtk_curve_set_range ##### -->
<para>
Sets the minimum and maximum x and y values of the curve.
The curve is also reset with a call to gtk_curve_reset().
</para>

@curve: a #GtkCurve.
@min_x: the minimum x value.
@max_x: the maximum x value.
@min_y: the minimum y value.
@max_y: the maximum y value.
@Deprecated: 2.20: Don't use this widget anymore.


<!-- ##### FUNCTION gtk_curve_get_vector ##### -->
<para>
Returns a vector of points representing the curve.
</para>

@curve: a #GtkCurve.
@veclen: the number of points to calculate.
@vector: returns the points.
@Deprecated: 2.20: Don't use this widget anymore.


<!-- ##### FUNCTION gtk_curve_set_vector ##### -->
<para>
Sets the vector of points on the curve.
The curve type is set to %GTK_CURVE_TYPE_FREE.
</para>

@curve: a #GtkCurve.
@veclen: the number of points.
@vector: the points on the curve.
@Deprecated: 2.20: Don't use this widget anymore.


<!-- ##### FUNCTION gtk_curve_set_curve_type ##### -->
<para>
Sets the type of the curve. 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.
</para>

@curve: a #GtkCurve.
@type: the type of the curve.
@Deprecated: 2.20: Don't use this widget anymore.