Sha256: 92de36aef17b1b1617c13a19f84fcadce31fcf83fef98ce0dea5c5f23da1ec83

Contents?: true

Size: 642 Bytes

Versions: 24

Compression:

Stored size: 642 Bytes

Contents

class RecordingSurfaceTest < Test::Unit::TestCase
  include Helper

  def setup
    only_surface("Recording")
  end

  def test_new
    only_not_windows
    only_cairo_version(1, 12, 0)
    surface = Cairo::RecordingSurface.new(10, 20, 300, 400)
    assert_equal([0.0, 0.0, 0.0, 0.0], surface.ink_extents)
    Cairo::Context.create(surface) do |context|
      context.move_to(15, 30)
      context.line_to(80, 100)
      context.stroke
    end
    if Cairo.satisfied_version?(1, 15)
      assert_equal([14.0, 29.0, 67.0, 72.0], surface.ink_extents)
    else
      assert_equal([10.0, 20.0, 61.0, 61.0], surface.ink_extents)
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

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