Sha256: 9628f85725743bc3454f53243d793b936c35674f6e1112f666551c1d3ebca6b0

Contents?: true

Size: 782 Bytes

Versions: 59

Compression:

Stored size: 782 Bytes

Contents

require 'rvg/rvg'

Magick::RVG.dpi = 90

rvg = Magick::RVG.new(12.cm, 4.cm).viewbox(0, 0, 1200, 400) do |canvas|
    canvas.background_fill = 'white'
    canvas.desc = "Example polyline01 - increasingly larger bars"

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

    canvas.polyline(50,375,
                    150,375,150,325,250,325,250,375,
                    350,375,350,250,450,250,450,375,
                    550,375,550,175,650,175,650,375,
                    750,375,750,100,850,100,850,375,
                    950,375,950,25,1050,25,1050,375,
                    1150,375).styles(:fill=>'none', :stroke=>'blue', :stroke_width=>10)

end

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

Version data entries

59 entries across 59 versions & 2 rubygems

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