/usr/share/doc/libsvg-ruby1.8/examples/sample3.rb is in libsvg-ruby1.8 1.0.3-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | #==============================================================================#
# sample3.rb
# $Id: sample3.rb,v 1.6 2002/11/19 10:15:34 rcn Exp $
#==============================================================================#
#==============================================================================#
require 'svg/svg'
#==============================================================================#
ruby_color = '#990000'
svg = SVG.new('4in', '4in', '0 0 400 400')
svg << SVG::Rect.new(76, 75, 248, 120) {
self.style = SVG::Style.new
self.style.fill = '#FFFFFF'
self.style.stroke = ruby_color
self.style.stroke_width = 2
}
svg << SVG::Rect.new(75, 195, 250, 120) {
self.style = SVG::Style.new
self.style.fill = ruby_color
}
svg << SVG::Text.new(200, 140, 'Ruby') {
self.style = SVG::Style.new
self.style.fill = ruby_color
self.style.font_size = 100
self.style.font_family = 'serif'
self.style.baseline_shift = 'sub'
self.style.text_anchor = 'middle'
}
svg << SVG::Text.new(200, 260, 'Ruby') {
self.style = SVG::Style.new
self.style.fill = '#FFFFFF'
self.style.font_size = 100
self.style.font_family = 'serif'
self.style.baseline_shift = 'sub'
self.style.text_anchor = 'middle'
}
print svg.to_s
#==============================================================================#
#==============================================================================#
|