Sha256: 8f1718ed40d2a196baf598ef1355b5370d395a797b99f938a743fda226f210ba

Contents?: true

Size: 611 Bytes

Versions: 67

Compression:

Stored size: 611 Bytes

Contents

#! /usr/local/bin/ruby -w
require 'RMagick'

imgl = Magick::ImageList.new
imgl.new_image(300, 100, Magick::HatchFill.new('white','lightcyan2'))

points = [12,93.75,   37,93.75,  37,81.25,  62,81.25,
          62,93.75,   87,93.75,  87,62,    112,62,    112,93.75,
          137,93.75, 137,43.75, 162,43.75, 162,93.75,
          187,93.75, 187,25,    212,25,    212,93.75, 237,93.75,
          237,6.25,  262,6.25,  262,93.75, 287,93.75]

gc = Magick::Draw.new
gc.stroke('blue').stroke_width(3)
gc.fill_opacity(0)
gc.polyline(*points)

gc.draw(imgl)

imgl.border!(1,1, "lightcyan2")

imgl.write("polyline.gif")

Version data entries

67 entries across 67 versions & 2 rubygems

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