Sha256: cdfc88d652d97ec891ad2a20bfdf20237f539682b45985af5d497260b3e99563

Contents?: true

Size: 629 Bytes

Versions: 59

Compression:

Stored size: 629 Bytes

Contents

require 'rvg/rvg'

Magick::RVG.dpi = 90

rvg = Magick::RVG.new(12.cm, 4.cm) do |canvas|
    canvas.viewbox(0, 0, 1200, 400)
    canvas.background_fill = 'white'
    canvas.desc = "Example rect02 - rounded rectangles"

    # Show outline of canvas using 'rect' method
    canvas.rect(1195, 395, 1, 1).styles(:fill=>'none', :stroke=>'blue', :stroke_width=>2)

    canvas.rect(400, 200, 100, 100).round(50).styles(:fill=>'green')

    canvas.g.translate(700, 210).rotate(-30) do |grp|
        grp.rect(400, 200, 0, 0).round(50).styles(:fill=>'none', :stroke=>'purple', :stroke_width=>30)
    end

end

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

Version data entries

59 entries across 59 versions & 2 rubygems

Version Path
rmagick-2.13.4 doc/ex/rect02.rb
rmagick-2.13.3 doc/ex/rect02.rb
rmagick-2.13.3.rc1 doc/ex/rect02.rb
rmagick-2.13.2 doc/ex/rect02.rb
rdp-rmagick-0.0.0 doc/ex/rect02.rb
rmagick-2.13.1 doc/ex/rect02.rb
rmagick-2.12.2 doc/ex/rect02.rb
rmagick-2.12.1 doc/ex/rect02.rb
rmagick-2.12.0 doc/ex/rect02.rb
rmagick-2.11.1 doc/ex/rect02.rb
rmagick-2.10.0 doc/ex/rect02.rb
rmagick-2.11.0 doc/ex/rect02.rb
rmagick-1.10.1 doc/ex/rect02.rb
rmagick-1.10.0 doc/ex/rect02.rb
rmagick-1.13.0 doc/ex/rect02.rb
rmagick-1.12.0 doc/ex/rect02.rb
rmagick-1.11.1 doc/ex/rect02.rb
rmagick-1.11.0 doc/ex/rect02.rb
rmagick-1.15.10 doc/ex/rect02.rb
rmagick-1.15.1 doc/ex/rect02.rb