Sha256: 8bd775a6fb9f5d4c10eb6ae30d7038bce8302dbb1001d4d0094d01d063626b73

Contents?: true

Size: 781 Bytes

Versions: 4

Compression:

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

4 entries across 4 versions & 1 rubygems

Version Path
rmagick-1.8.0 doc/ex/polyline01.rb
rmagick-1.8.1 doc/ex/polyline01.rb
rmagick-1.8.2 doc/ex/polyline01.rb
rmagick-1.8.3 doc/ex/polyline01.rb