/usr/share/gtk-doc/html/pygtk/class-gtkcurve.html is in python-gtk2-doc 2.24.0-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.Curve</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtkcontainer.html" title="gtk.Container"><link rel="next" href="class-gtkdialog.html" title="gtk.Dialog"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.Curve</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkcontainer.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkdialog.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.Curve"><a name="class-gtkcurve"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.Curve</h2><p>gtk.Curve — allows direct editing of a curve.</p></div><div class="refsect1" title="Synopsis"><a name="id3665768"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Curve</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkdrawingarea.html" title="gtk.DrawingArea">gtk.DrawingArea</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtkcurve.html#constructor-gtkcurve" title="Constructor">gtk.Curve</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcurve.html#method-gtkcurve--reset" title="gtk.Curve.reset">reset</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcurve.html#method-gtkcurve--set-gamma" title="gtk.Curve.set_gamma">set_gamma</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gamma</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcurve.html#method-gtkcurve--set-range" title="gtk.Curve.set_range">set_range</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>min_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>max_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>min_y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>max_y</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcurve.html#method-gtkcurve--get-vector" title="gtk.Curve.get_vector">get_vector</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span><span class="initializer">=-1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcurve.html#method-gtkcurve--set-vector" title="gtk.Curve.set_vector">set_vector</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>vector</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcurve.html#method-gtkcurve--set-curve-type" title="gtk.Curve.set_curve_type">set_curve_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3666017"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
+-- <a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
+-- <a class="link" href="class-gtkdrawingarea.html" title="gtk.DrawingArea">gtk.DrawingArea</a>
+-- <a class="link" href="class-gtkcurve.html" title="gtk.Curve">gtk.Curve</a>
</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3666062"></a><h2>Implemented Interfaces</h2><p>
<a class="link" href="class-gtkcurve.html" title="gtk.Curve"><code class="classname">gtk.Curve</code></a>
implements
<a class="link" href="class-gtkbuildable.html" title="gtk.Buildable"><code class="classname">gtk.Buildable</code></a>
</p></div><div class="refsect1" title="gtk.Curve Properties"><a name="properties-gtkcurve"></a><h2>gtk.Curve Properties</h2><p><a class="link" href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p><p><a class="link" href="class-gtkwidget.html#properties-gtkwidget" title="gtk.Widget Properties">gtk.Widget Properties</a></p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="3.5in"></colgroup><tbody><tr valign="top"><td valign="top">"curve-type"</td><td valign="top">Read/Write</td><td valign="top">The curve type. One of linear
(<code class="literal">gtk.CURVE_TYPE_LINEAR</code>), spline interpolated
(<code class="literal">gtk.CURVE_TYPE_SPLINE</code>), or free-form
(<code class="literal">gtk.CURVE_TYPE_FREE</code>).</td></tr><tr valign="top"><td valign="top">"max-x"</td><td valign="top">Read/Write</td><td valign="top">The maximum possible value for X</td></tr><tr valign="top"><td valign="top">"max-y"</td><td valign="top">Read/Write</td><td valign="top">The maximum possible value for Y</td></tr><tr valign="top"><td valign="top">"min-x"</td><td valign="top">Read/Write</td><td valign="top">The minimum possible value for X</td></tr><tr valign="top"><td valign="top">"min-y"</td><td valign="top">Read/Write</td><td valign="top">The minimum possible value for Y</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.Curve Style Properties"><a name="style-properties-gtkcurve"></a><h2>gtk.Curve Style Properties</h2><p><a class="link" href="class-gtkwidget.html#style-properties-gtkwidget" title="gtk.Widget Style Properties">gtk.Widget Style Properties</a></p></div><div class="refsect1" title="gtk.Curve Signal Prototypes"><a name="signal-prototypes-gtkcurve"></a><h2>gtk.Curve Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><p><a class="link" href="class-gtkwidget.html#signal-prototypes-gtkwidget" title="gtk.Widget Signal Prototypes">gtk.Widget Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtkcurve.html#signal-gtkcurve--curve-type-changed" title='The "curve-type-changed" gtk.Curve Signal'>curve-type-changed</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>curve</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>widget</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id3666404"></a><h2>Description</h2><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p><a class="link" href="class-gtkcurve.html" title="gtk.Curve"><code class="classname">gtk.Curve</code></a>
is deprecated in GTK+ 2.20 and PyGTK 2.22 since it is too specialized.</p></div><p>The <a class="link" href="class-gtkcurve.html" title="gtk.Curve"><code class="classname">gtk.Curve</code></a> 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
<span class="application">Gimp</span>. The <a class="link" href="class-gtkcurve.html" title="gtk.Curve"><code class="classname">gtk.Curve</code></a> 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.</p></div><div class="refsect1" title="Constructor"><a name="constructor-gtkcurve"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.Curve</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new gtk.Curve object</td></tr></tbody></table><p>Creates a new <a class="link" href="class-gtkcurve.html" title="gtk.Curve"><code class="classname">gtk.Curve</code></a>
object</p></div><div class="refsect1" title="Methods"><a name="id3666520"></a><h2>Methods</h2><div class="refsect2" title="gtk.Curve.reset"><a name="method-gtkcurve--reset"></a><h3>gtk.Curve.reset</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">reset</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">reset</code>() 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.</p></div><div class="refsect2" title="gtk.Curve.set_gamma"><a name="method-gtkcurve--set-gamma"></a><h3>gtk.Curve.set_gamma</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_gamma</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gamma</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gamma</code></strong> :</span></p></td><td>the gamma value</td></tr></tbody></table><p>The <code class="methodname">set_gamma</code>() method recomputes the
entire curve using the value in <em class="parameter"><code>gamma</code></em>. 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
<code class="literal">gtk.CURVE_TYPE_FREE</code>.</p></div><div class="refsect2" title="gtk.Curve.set_range"><a name="method-gtkcurve--set-range"></a><h3>gtk.Curve.set_range</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_range</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>min_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>max_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>min_y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>max_y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>min_x</code></strong> :</span></p></td><td>the new minimum x value</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>max_x</code></strong> :</span></p></td><td>the maximum x value.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>min_y</code></strong> :</span></p></td><td>the new minimum y value</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>max_y</code></strong> :</span></p></td><td>the maximum y value.</td></tr></tbody></table><p>The <code class="methodname">set_range</code>() method sets the
"min-x", "min-y", "max-x" and "max-y" properties from<em class="parameter"><code>
min_x</code></em>, <em class="parameter"><code>min_y</code></em>,<em class="parameter"><code>
max_x</code></em>, and <em class="parameter"><code>max_y</code></em>. The curve is also reset
with a call to <a class="link" href="class-gtkcurve.html#method-gtkcurve--reset" title="gtk.Curve.reset"><code class="methodname">reset</code>()</a>.</p></div><div class="refsect2" title="gtk.Curve.get_vector"><a name="method-gtkcurve--get-vector"></a><h3>gtk.Curve.get_vector</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_vector</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span><span class="initializer">=-1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>size</code></strong> :</span></p></td><td>the number of points to return or -1 to return
all the points in the curve.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing the
points</td></tr></tbody></table><p>The <code class="methodname">get_vector</code>() method returns a tuple
of points representing the curve. The number of points to return is
specified by <em class="parameter"><code>size</code></em>; if <em class="parameter"><code>size</code></em> is
-1 all the points in the curve are returned.</p></div><div class="refsect2" title="gtk.Curve.set_vector"><a name="method-gtkcurve--set-vector"></a><h3>gtk.Curve.set_vector</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_vector</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>vector</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>vector</code></strong> :</span></p></td><td>a list or tuple containing the points of the
curve</td></tr></tbody></table><p>The <code class="methodname">set_vector</code>() method sets the curve
using the points in <em class="parameter"><code>vector</code></em>. The curve type is set to
<code class="literal">gtk.CURVE_TYPE_FREE</code>.</p></div><div class="refsect2" title="gtk.Curve.set_curve_type"><a name="method-gtkcurve--set-curve-type"></a><h3>gtk.Curve.set_curve_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_curve_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>the new curve type:
<code class="literal">gtk.CURVE_TYPE_LINEAR</code>,
<code class="literal">gtk.CURVE_TYPE_SPLINE</code> or
<code class="literal">gtk.CURVE_TYPE_FREE</code></td></tr></tbody></table><p>The <code class="methodname">set_curve_type</code>() method sets the
"curve-type" property with the value of <em class="parameter"><code>type</code></em>. The
curve type must be one of <code class="literal">gtk.CURVE_TYPE_LINEAR</code>,
<code class="literal">gtk.CURVE_TYPE_SPLINE</code> or
<code class="literal">gtk.CURVE_TYPE_FREE</code>. 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.</p></div></div><div class="refsect1" title="Signals"><a name="id3667161"></a><h2>Signals</h2><div class="refsect2" title='The "curve-type-changed" gtk.Curve Signal'><a name="signal-gtkcurve--curve-type-changed"></a><h3>The "curve-type-changed" gtk.Curve Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>curve</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>curve</code></em> :</span></p></td><td>the curve that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>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
<a class="link" href="class-gtkcurve.html#method-gtkcurve--set-curve-type" title="gtk.Curve.set_curve_type"><code class="methodname">set_curve_type</code>()</a>.
It is also changed as a side-effect of calling <a class="link" href="class-gtkcurve.html#method-gtkcurve--reset" title="gtk.Curve.reset"><code class="methodname">reset</code>()</a> or
<a class="link" href="class-gtkcurve.html#method-gtkcurve--set-gamma" title="gtk.Curve.set_gamma"><code class="methodname">set_gamma</code>()</a></p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtkcontainer.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gtkdialog.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.Container </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.Dialog</td></tr></table></div></body></html>
|