Sha256: 0fd14fa8c97168c0a4009f217cdd3c24162eea4f95dc094e37306afe515289e7
Contents?: true
Size: 639 Bytes
Versions: 4
Compression:
Stored size: 639 Bytes
Contents
require 'rvg/rvg' include Magick RVG.dpi = 90 rvg = RVG.new(12.cm, 4.cm).viewbox(0, 0, 1200, 400) do |canvas| canvas.background_fill = 'white' canvas.desc = "Example ellipse01 - examples of ellipses" # Show outline of canvas using rect method canvas.rect(1195, 395, 1, 1).styles(:fill=>'none', :stroke=>'blue', :stroke_width=>2) canvas.g.translate(300, 200) do |grp| grp.ellipse(250, 100).styles(:fill=>'red') end canvas.g.translate(900, 200).rotate(-30) do |grp| grp.ellipse(250, 100).styles(:fill=>'none', :stroke=>'blue', :stroke_width=>20) end end rvg.draw.write('ellipse01.gif')
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rmagick-1.8.1 | doc/ex/ellipse01.rb |
rmagick-1.8.0 | doc/ex/ellipse01.rb |
rmagick-1.8.2 | doc/ex/ellipse01.rb |
rmagick-1.8.3 | doc/ex/ellipse01.rb |