Sha256: a726c6e1858eccd6e5bcbb918de414896206fe06dfceb45c972b0230e82aa699
Contents?: true
Size: 776 Bytes
Versions: 6
Compression:
Stored size: 776 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
6 entries across 6 versions & 1 rubygems