Sha256: 2d66a2fa17237c000404d87f3108d6fbfce8abcdf2715d3155788e3b63a58deb

Contents?: true

Size: 716 Bytes

Versions: 44

Compression:

Stored size: 716 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') 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

44 entries across 44 versions & 1 rubygems

Version Path
rmagick-1.10.1 doc/ex/InitialCoords.rb
rmagick-1.10.0 doc/ex/InitialCoords.rb
rmagick-1.11.0 doc/ex/InitialCoords.rb
rmagick-1.12.0 doc/ex/InitialCoords.rb
rmagick-1.11.1 doc/ex/InitialCoords.rb
rmagick-1.13.0 doc/ex/InitialCoords.rb
rmagick-1.14.0 doc/ex/InitialCoords.rb
rmagick-1.15.1 doc/ex/InitialCoords.rb
rmagick-1.14.1 doc/ex/InitialCoords.rb
rmagick-1.15.10 doc/ex/InitialCoords.rb
rmagick-1.15.0 doc/ex/InitialCoords.rb
rmagick-1.15.13 doc/ex/InitialCoords.rb
rmagick-1.15.12 doc/ex/InitialCoords.rb
rmagick-1.15.14 doc/ex/InitialCoords.rb
rmagick-1.15.15 doc/ex/InitialCoords.rb
rmagick-1.15.11 doc/ex/InitialCoords.rb
rmagick-1.15.3 doc/ex/InitialCoords.rb
rmagick-1.15.2 doc/ex/InitialCoords.rb
rmagick-1.15.17 doc/ex/InitialCoords.rb
rmagick-1.15.16 doc/ex/InitialCoords.rb