Sha256: 92e0e080ed5251256e6626431bb7fdc2e0fa86742a4d0e693a795fd6eb7ae033

Contents?: true

Size: 297 Bytes

Versions: 124

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

124 entries across 116 versions & 2 rubygems

Version Path
cairo-1.14.3-x86-mingw32 test/test_color.rb
cairo-1.14.3-x64-mingw32 test/test_color.rb
cairo-1.14.3 test/test_color.rb
cairo-1.14.2-x64-mingw32 test/test_color.rb
cairo-1.14.2-x86-mingw32 test/test_color.rb
cairo-1.14.2 test/test_color.rb
cairo-1.14.1-x86-mingw32 test/test_color.rb
cairo-1.14.1-x64-mingw32 test/test_color.rb
cairo-1.14.1 test/test_color.rb
cairo-1.14.0-x64-mingw32 test/test_color.rb
cairo-1.14.0-x86-mingw32 test/test_color.rb
cairo-1.14.0 test/test_color.rb
cairo-1.12.9-x86-mingw32 test/test_color.rb
cairo-1.12.9 test/test_color.rb
cairo-1.12.8-x86-mingw32 test/test_color.rb
cairo-1.12.8 test/test_color.rb
cairo-1.12.7-x86-mingw32 test/test_color.rb
cairo-1.12.7 test/test_color.rb
cairo-1.12.6-x86-mingw32 test/test_color.rb
cairo-1.12.6 test/test_color.rb