Sha256: a22a51ba372b58084c25ee12b9eb0864bd80695961e19d9d531a4bc8c0f1e1ef

Contents?: true

Size: 714 Bytes

Versions: 13

Compression:

Stored size: 714 Bytes

Contents

require 'rvg/rvg'

rvg = Magick::RVG.new(300, 100) do |canvas|
  canvas.desc = "Example InitialCoords - SVG's initial coordinate system"
  canvas.background_fill = 'white'
  canvas.g.styles(:fill=>'none', :stroke=>'black', :stroke_width=>3) do |grp|
    grp.line(0, 1.5, 300, 1.5)
    grp.line(1.5, 0, 1.5, 100)
  end
  canvas.g.styles(:fill=>'red', :stroke=>'none') do |grp|
    grp.rect(3, 3)
    grp.rect(3, 3, 297,  0)
    grp.rect(3, 3,   0, 97)
  end
  canvas.g.styles(:font_size=>14, :font_family=>'Verdana', :font_weight=>'normal', :font_style=>'normal') do |grp|
    grp.text(10, 20, '(0,0)')
    grp.text(240, 20, '(300,0)')
    grp.text(10, 90, '(0,100)')
  end
end

rvg.draw.write('InitialCoords.gif')

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
rmagick-windows-2.16.5 doc/ex/InitialCoords.rb
rmagick-windows-2.16.4 doc/ex/InitialCoords.rb
rmagick-windows-2.16.3 doc/ex/InitialCoords.rb
rmagick-windows-2.16.2 doc/ex/InitialCoords.rb
rmagick-windows-2.16.1 doc/ex/InitialCoords.rb
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/rmagick-2.16.0/doc/ex/InitialCoords.rb
rmagick-2.16.0 doc/ex/InitialCoords.rb
rmagick-2.15.4 doc/ex/InitialCoords.rb
rmagick-2.15.3 doc/ex/InitialCoords.rb
rmagick-2.15.2 doc/ex/InitialCoords.rb
rmagick-2.15.1 doc/ex/InitialCoords.rb
rmagick-2.15.0 doc/ex/InitialCoords.rb
rmagick-2.14.0 doc/ex/InitialCoords.rb