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

Gdk::Color

Gdk::Color クラス

クラスメソッド

Gdk::Color.new(red, green, blue)
Creats a new Gdk::Color.
  • red: The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
  • green: The blue component of the color
  • blue: The green component of the color
  • Returns: The newly created Gdk::Color
Gdk::Color.parse(spec)
Parses a textual specification of a color and fill in the red, green, and blue fields of a Gdk::Color structure. The color is not allocated, you must call Gdk::Colormap#alloc_color yourself. The text string can be in any of the forms accepted by XParseColor; these include name for a color from rgb.txt, such as DarkSlateGray, or a hex specification such as 305050. If spec can't be parsed, the ArgumentError will be occured.
  • spec: the string specifying the color.
  • Returns: the Gdk::Color

インスタンスメソッド

==(other)
Compares two colors.
  • other: another Gdk::Color.
  • Returns: true if the two colors compare equal
red
Gets the value of red.
  • Returns: self
red=(red)
Sets the value of red.
  • red: The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
  • Returns: red
set_red(red)
Same as Gdk::Color#red=.
  • red: The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
  • Returns: self
green
要編集
green=(green)
Sets the value of green.
  • green: The green component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
  • Returns: green
set_green(green)
Same as Gdk::Color#green=.
  • green: The green component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
  • Returns: self
blue
要編集
blue=(blue)
Sets the value of blue.
  • blue: The blue component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
  • Returns: blue
set_blue(blue)
Same as Gdk::Color#blue=.
  • blue: The blue component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
  • Returns: self
pixel
Retrieves the value used to draw this color on the screen (for allocated colors).
  • Returns: the value used to draw this color on the screen
to_a
Retrieves the value of the color.
  • Returns: [red, green, blue]
to_s
要編集

更新履歴

  • 2014-06-16 クラスのメンバでリストから漏れているものを追加。 - きたがわ

Masao?