新規作成  編集  Ruby-GNOME2 Project Website  ページ一覧  検索  更新履歴  編集履歴  RSS  Back  ログイン

Gtk::Curve 差分 - Ruby-GNOME2 Project Website

  • 最後の更新で追加された部分はこのように表示します。
  • 最後の更新で削除された部分はこのように表示します。

= class Gtk::CurveGtk::Curve クラス

The Gtk::Curve 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.

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.

((* NOTE *))

This widget is considered too specialized/little-used for GTK+, and will in the future be moved to some other package. If your application needs this widget, feel free to use it, as the widget does work and is useful in some applications; it's just not of general interest. However, we are not accepting new features for the widget, and it will eventually move out of the GTK+ distribution.


== Object Hierarchyオブジェクト階層
* Object
  * GLib::Instantiatable
    * GLib::Object
      * Gtk::Object
        * Gtk::Widget
          * Gtk::DrawingArea
            * Gtk::Curve

== Class Methodsインクルードされているモジュール

* Gtk::Buildable
* Atk::Implementor
* GLib::Interface

== クラスメソッド

--- Gtk::Curve.new
    Creates a new Gtk::Curve.
    * Returns: a new Gtk::Curve.  

== Instance Methodsインスタンスメソッド
--- reset
    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.
    * Returns: self

--- gamma=(gamma)
    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.
    * gamma: the gamma value (Float)
    * Returns: self
--- set_gamma(gamma)
    Same as Gtk::Curve#gamma=.
    * gamma: the gamma value (Float)
    * Returns: self
--- set_range(min_x, max_x, min_y, max_y)
    Sets the minimum and maximum x and y values of the curve. The curve is also reset with a call to Gtk::Curve#reset.
    * min_x : the minimum x value.  
    * max_x : the maximum x value.  
    * min_y : the minimum y value.  
    * max_y : the maximum y value.  
    * Returns: self

--- get_vector(len)
    Returns a vector of points representing the curve.
    * len: the number of points to calculate.  
    * Returns: returns the points(An Array of Float).

--- set_vector(len, vector)
    Sets the vector of points on the curve. The curve type is set to Gtk::Curve::TYPE_FREE.
    * len: the number of points.  
    * vector: the points on the curve. (An Array of Float)

--- curve_type
    Gets the type of the curve which is this curve linear, spline interpolated, or free-form.
    * Returns: the type of the curve
--- curve_type=(type)
    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.
    * type: the type of the curve. (Gtk::Curve#Type)
    * Returns: type
--- set_curve_type(curve_type)
    Same as Gtk::Curve#curve_type=.
    * type: the type of the curve. (Gtk::Curve#Type)
    * Returns: self

--- max_x
    Gets the maximum possible X value.
    * Returns: maximum possible X value
--- max_x=(max_x)
    Sets the maximum possible X value.
    * max_x: maximum possible X value
    * Returns: max_x
--- set_max_x(max_x)
    Same as max_x=.
    * max_x: maximum possible X value
    * Returns: self

--- max_y
    Gets the maximum possible value for Y.
    * Returns: maximum possible value for Y
--- max_y=(max_y)
    Sets the maximum possible value for Y.
    * max_y: maximum possible value for Y
    * Returns: max_y
--- set_max_y(max_y)
    Same as max_y=.
    * max_y: maximum possible value for Y
    * Returns: self

--- min_x
    Gets the minimum possible value for X.
    * Returns: minimum possible value for X
--- min_x=(min_x)
    Sets the minimum possible value for X.
    * min_x: minimum possible value for X
    * Returns: min_x
--- set_min_x(min_x)
    Same as min_x=.
    * min_x: minimum possible value for X
    * Returns: self

--- min_y
    Gets the minimum possible value for Y.
    * Returns: minimum possible value for Y
--- min_y=(min_y)
    Sets the minimum possible value for Y.
    * min_y: minimum possible value for Y
    * Returns: min_y
--- set_min_y(min_y)
    Same as min_y=.
    * min_y: minimum possible value for Y
    * Returns: self

--- vector()
    ((*要編集*))

--- vector=()
    ((*要編集*))


== Constants定数
=== Type
--- TYPE_LINEAR
    linear interpolation
--- TYPE_SPLINE
    spline interpolation
--- TYPE_FREE
    free form curve

== Propertiesプロパティ
--- curve-type: Gtk::CurveType (Read/Write)
    Is this curve linear, spline interpolated, or free-form
    * Default value: Gtk::Curve::TYPE_LINEAR

--- max-x: Float (Read/Write)
    Maximum possible X value
    * Default value: 1

--- max-y: Float (Read/Write)
    Maximum possible value for Y
    * Default value: 1

--- min-x: Float (Read/Write)
    Minimum possible value for X
    * Default value: 0

--- min-y: Float (Read/Write)
    Minimum possible value for Y
    * Default value: 0

== Signalsシグナル
--- curve-type-changed: self
    Emitted when the curve type has been changed. The curve type can be changed explicitly with a call to Gtk::Curve#curve_type=. It is also changed as a side-effect of calling Gtk::Curve#reset or Gtk::Curve#gamma=.
    * self: Gtk::Curve

== See Also関連ページ
* Gtk::GammaCurve a subclass for editing gamma curves.

== ChangeLog更新履歴
* 2014-06-15 クラスのメンバで漏れていたものを追加。 - ((<きたがわ>))

* 2006-02-01 Added. - ((<Masao>))