# File gdk3/test/test-gdk-cairo.rb, line 21 def setup output = StringIO.new surface = Cairo::PDFSurface.new(output, 10, 10) @context = Cairo::Context.new(surface) end
# File gdk3/test/test-gdk-cairo.rb, line 27 def test_set_source_color color = Gdk::Color.new(0xffff, 0x0000, 0xffff) @context.source_color = color assert_equal(Cairo::Color::RGB.new(1.0, 0.0, 1.0), @context.source.color) end
# File gdk3/test/test-gdk-cairo.rb, line 34 def test_set_source_rgba rgba = Gdk::RGBA.new(0.1, 0.2, 0.3, 0.4) @context.source_rgba = rgba assert_equal(Cairo::Color::RGB.new(0.1, 0.2, 0.3, 0.4), @context.source.color) end