Sha256: a73fe2cd748c29ee9ef21275b76839b24257e021cb31b6398ec538e11d7165bf

Contents?: true

Size: 763 Bytes

Versions: 15

Compression:

Stored size: 763 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

15 entries across 15 versions & 2 rubygems

Version Path
rmagick-2.13.4 doc/ex/InitialCoords.rb
rmagick-2.13.3 doc/ex/InitialCoords.rb
rmagick-2.13.3.rc1 doc/ex/InitialCoords.rb
rmagick-2.13.2 doc/ex/InitialCoords.rb
rdp-rmagick-0.0.0 doc/ex/InitialCoords.rb
rmagick-2.13.1 doc/ex/InitialCoords.rb
rmagick-2.12.2 doc/ex/InitialCoords.rb
rmagick-2.12.1 doc/ex/InitialCoords.rb
rmagick-2.12.0 doc/ex/InitialCoords.rb
rmagick-2.11.1 doc/ex/InitialCoords.rb
rmagick-2.10.0 doc/ex/InitialCoords.rb
rmagick-2.11.0 doc/ex/InitialCoords.rb
rmagick-2.9.0 doc/ex/InitialCoords.rb
rmagick-2.9.1 doc/ex/InitialCoords.rb
rmagick-2.9.2 doc/ex/InitialCoords.rb