Sha256: 92e0e080ed5251256e6626431bb7fdc2e0fa86742a4d0e693a795fd6eb7ae033

Contents?: true

Size: 297 Bytes

Versions: 123

Compression:

Stored size: 297 Bytes

Contents

require 'cairo'

class ColorTest < Test::Unit::TestCase
  def test_rgb_to_hsv
    color = rgb(0.3, 0.5, 0.75)
    assert_equal(color, color.to_hsv.to_rgb)
  end

  private
  def rgb(r, g, b)
    Cairo::Color::RGB.new(r, g, b)
  end

  def hsv(h, s, v)
    Cairo::Color::HSV.new(h, s, v)
  end
end

Version data entries

123 entries across 115 versions & 2 rubygems

Version Path
cairo-1.17.13 test/test_color.rb
cairo-1.17.12 test/test_color.rb
cairo-1.17.11 test/test_color.rb
cairo-1.17.10 test/test_color.rb
cairo-1.17.9 test/test_color.rb
cairo-1.17.8 test/test_color.rb
cairo-1.17.7 test/test_color.rb
cairo-1.17.6 test/test_color.rb
cairo-1.17.5 test/test_color.rb
cairo-1.17.4 test/test_color.rb
cairo-1.16.6 test/test_color.rb
cairo-1.16.5 test/test_color.rb
cairo-1.16.4 test/test_color.rb
cairo-1.16.3 test/test_color.rb
cairo-1.16.2 test/test_color.rb
cairo-1.16.1-x86-mingw32 test/test_color.rb
cairo-1.16.1-x64-mingw32 test/test_color.rb
cairo-1.16.1 test/test_color.rb
cairo-1.16.0-x86-mingw32 test/test_color.rb
cairo-1.16.0-x64-mingw32 test/test_color.rb