Sha256: 7ece5551fff48d4323f683f2045e9fd4da3c6b9d29c87e798300158d45c3b39a
Contents?: true
Size: 414 Bytes
Versions: 13
Compression:
Stored size: 414 Bytes
Contents
require 'rvg/rvg' hat = Magick::Image.read('images/Flower_Hat.jpg').first rvg = Magick::RVG.new(hat.columns, hat.rows) do |canvas| keyhole = Magick::RVG::ClipPath.new do |path| path.circle(60, canvas.width/2, 80) path.polygon(canvas.width/2-10, 60, 40, 230, 160, 230, canvas.width/2+10, 60) end canvas.image(hat, nil, nil, 20, 20).styles(:clip_path=>keyhole) end rvg.draw.write('rvg_clippath.gif')
Version data entries
13 entries across 13 versions & 3 rubygems