Sha256: 5af123f7603cface28810ea737796717d17c02ece7feec1fc412b9b332e309bd

Contents?: true

Size: 597 Bytes

Versions: 59

Compression:

Stored size: 597 Bytes

Contents

#! /usr/local/bin/ruby -w

require 'rvg/rvg'

target = Magick::RVG.new.viewbox(0,0,200,200) do |targ|
    targ.g.styles(:stroke_width=>20, :stroke=>'#ff5600', :fill=>'#abd600') do |grp|
        grp.circle(90, 100, 100)
        grp.circle(60, 100, 100)
        grp.circle(30, 100, 100)
    end
end

rvg = Magick::RVG.new(258, 100) do |canvas|
    canvas.background_fill = '#51396b'
    canvas.use(target, 0, 0, 100, 100)
    canvas.use(target, 100, 16.6667, 66.7, 66.7)
    canvas.use(target, 166.6667, 25, 50, 50)
    canvas.use(target, 216.6667, 30, 40, 40)
end

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

Version data entries

59 entries across 59 versions & 2 rubygems

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