Sha256: b9e36bb12b7a40087486d49a6f3b19d71e28b5022680562618056bb1779b0d16

Contents?: true

Size: 814 Bytes

Versions: 25

Compression:

Stored size: 814 Bytes

Contents

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

  def setup
    only_surface("XML")
  end

  def test_new
    only_cairo_version(1, 12, 0)
    output = StringIO.new
    device = Cairo::XMLDevice.new(output)
    surface = Cairo::XMLSurface.new(device, 100, 200)
    Cairo::Context.create(surface) do |context|
      context.move_to(15, 30)
      context.line_to(80, 100)
      context.stroke
    end
    assert_equal(<<-EOX, output.string)
<stroke>
  <operator>OVER</operator>
  <line-width>2</line-width>
  <miter-limit>10</miter-limit>
  <line-cap>LINE_CAP_BUTT</line-cap>
  <line-join>LINE_JOIN_MITER</line-join>
  <source-pattern>
    <solid>0 0 0 1</solid>
  </source-pattern>
  <path> 15 30 m 80 100 l</path>
  <tolerance>0.1</tolerance>
  <antialias>DEFAULT</antialias>
</stroke>
EOX
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

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