Sha256: f50b6f7ad19dda1ffc6d6d568590f2dac44f3b05dcfa0091e5e21e8ef7fb7e2f
Contents?: true
Size: 786 Bytes
Versions: 13
Compression:
Stored size: 786 Bytes
Contents
#!/usr/bin/env ruby -w require 'rvg/rvg' FONT_STYLES = {:font_size=>20, :font_weight=>'bold', :fill=>'white'} rvg = Magick::RVG.new(450, 150) do |canvas| canvas.background_fill = 'white' canvas.rect(400, 50, 25, 50) canvas.circle(40, 100, 75).styles(:opacity=>0.25, :stroke=>'blue', :fill=>'#00ff00',:stroke_width=>8) canvas.text(83, 83, '0.25').styles(FONT_STYLES) canvas.circle(40, 225, 75).styles(:opacity=>0.50, :stroke=>'blue', :fill=>'#00ff00',:stroke_width=>8) canvas.text(208, 83, '0.50').styles(FONT_STYLES) canvas.circle(40, 350, 75).styles(:opacity=>0.75, :stroke=>'blue', :fill=>'#00ff00',:stroke_width=>8) canvas.text(333, 83, '0.75').styles(FONT_STYLES) canvas.rect(449,149).styles(:fill=>'none',:stroke=>'blue') end rvg.draw.write('rvg_opacity.gif')
Version data entries
13 entries across 13 versions & 3 rubygems