Public Instance Aliases
== | -> | eql? |
Public Class methods
create
(red, green, blue)
Creates a new RGBTriple color
Parameters¶ ↑
red |
Value for red, should be between 0 and 255 |
green |
Value for green, should be between 0 and 255 |
blue |
Value for blue, should be between 0 and 255 |
[show source]
# File lib/free-image/types/rgb_triple.rb, line 21 def self.create(red, green, blue) result = self.new result[:red] = red result[:green] = green result[:blue] = blue result end
Public Instance methods
eql?
(other)
[show source]
# File lib/free-image/types/rgb_triple.rb, line 29 def eql?(other) other.instance_of?(RGBQuad) and self[:red] == other[:red] and self[:green] == other[:green] and self[:blue] == other[:blue] end
to_s
()
[show source]
# File lib/free-image/types/rgb_triple.rb, line 37 def to_s "RGBQuad - Red: #{self[:red]}, Green: #{self[:green]}, Blue: #{self[:blue]}" end