Sha256: 6e3235c53202d43ef199df35c7c67ae6909ff0336db2cf4cfa5d2772cc5bed02
Contents?: true
Size: 735 Bytes
Versions: 15
Compression:
Stored size: 735 Bytes
Contents
#! /usr/local/bin/ruby -w require 'rvg/rvg' rvg = Magick::RVG.new(200, 100) do |canvas| canvas.background_fill = 'white' canvas.g.styles(:font_size=>16, :font_weight=>'normal', :font_style=>'normal') do |grp| grp.text( 30, 30, ":text_anchor=>'start'").styles(:text_anchor=>'start') grp.circle(1, 30, 30).styles(:stroke=>'red') grp.text(100, 50, ":text_anchor=>'middle'").styles(:text_anchor=>'middle') grp.circle(1, 100, 50).styles(:stroke=>'red') grp.text(170, 70, ":text_anchor=>'end'").styles(:text_anchor=>'end') grp.circle(1, 170, 70).styles(:stroke=>'red') end canvas.rect(199, 99).styles(:fill=>'none', :stroke=>'blue') end rvg.draw.write('text_styles.gif')
Version data entries
15 entries across 15 versions & 2 rubygems