Sha256: 601588351581ef88422db060fa5f102e711e64b599fda25d18c7e0d42e7ea591
Contents?: true
Size: 628 Bytes
Versions: 4
Compression:
Stored size: 628 Bytes
Contents
require 'rvg/rvg' include Magick RVG.dpi = 90 rvg = 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rmagick-1.8.0 | doc/ex/rect02.rb |
rmagick-1.8.1 | doc/ex/rect02.rb |
rmagick-1.8.2 | doc/ex/rect02.rb |
rmagick-1.8.3 | doc/ex/rect02.rb |