Sha256: 312b418e1a2ab780efda26f9498a3bd8ac52652d47ff0cf64195ff7159263dc8
Contents?: true
Size: 484 Bytes
Versions: 4
Compression:
Stored size: 484 Bytes
Contents
require 'rvg/rvg' include Magick RVG.dpi = 90 rvg = RVG.new(4.cm, 4.cm).viewbox(0, 0, 400, 400) do |canvas| canvas.title = "Example triangle01 - simple example of a 'path'" canvas.desc = 'A path that draws a triangle' canvas.background_fill = 'white' canvas.rect(395, 395, 1, 1).styles(:fill=>'none', :stroke=>'blue') canvas.path('M 100 100 L 300 100 L 200 300 z').styles(:fill=>'red', :stroke=>'blue', :stroke_width=>3) end rvg.draw.write('triangle01.gif')
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rmagick-1.8.0 | doc/ex/triangle01.rb |
rmagick-1.8.1 | doc/ex/triangle01.rb |
rmagick-1.8.2 | doc/ex/triangle01.rb |
rmagick-1.8.3 | doc/ex/triangle01.rb |