Sha256: a9d47eb28474af8901283f271f642246b2d5b288a987d186f2205301e51cd153

Contents?: true

Size: 462 Bytes

Versions: 6

Compression:

Stored size: 462 Bytes

Contents

require 'rvg/rvg'

Magick::RVG.dpi = 90

rvg = Magick::RVG.new(10.cm, 3.cm).viewbox(0, 0, 100, 30) do |canvas|
  canvas.background_fill = 'white'
  canvas.desc = "Example Use03 - 'use' with a 'transform' attribute"

  myrect = Magick::RVG::Group.new do |grp|
    grp.rect(60, 10)
  end
  canvas.rect(99.6, 29.6, 0.1, 0.1).styles(fill: 'none', stroke: 'blue', stroke_width: 0.2)
  canvas.use(myrect).translate(20, 2.5).rotate(10)
end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rmagick-4.1.0.rc2 doc/ex/Use03.rb
rmagick-4.1.0.rc1 doc/ex/Use03.rb
rmagick-4.0.0 doc/ex/Use03.rb
rmagick-3.2.0 doc/ex/Use03.rb
rmagick-3.1.0 doc/ex/Use03.rb
rmagick-3.0.0 doc/ex/Use03.rb