doc/ex/nonzero.rb in rmagick-1.8.3 vs doc/ex/nonzero.rb in rmagick-1.9.0
- old
+ new
@@ -1,17 +1,16 @@
#! /usr/local/bin/ruby -w
require 'rvg/rvg'
-include Magick
-RVG.dpi = 90
+Magick::RVG.dpi = 90
-rvg = RVG.new(12.cm, 4.cm).viewbox(0, 0, 1200, 400) do |canvas|
+rvg = Magick::RVG.new(12.cm, 4.cm).viewbox(0, 0, 1200, 400) do |canvas|
canvas.background_fill = 'white'
canvas.desc = "Example fillrule - nonzero - demonstrates fill_rule=>'nonzero'"
canvas.rect(1195, 393, 1, 1).styles(:fill=>'none', :stroke=>'blue')
- triangle = RVG::Group.new do |defs|
+ triangle = Magick::RVG::Group.new do |defs|
defs.path("M 16,0 L -8,9 v-18 z").styles(:fill=>'black', :stroke=>'none')
end
canvas.g.styles(:fill_rule=>'nonzero', :fill=>'red', :stroke=>'black', :stroke_width=>3) do |grp|
grp.path("M 250,75 L 323,301 131,161 369,161 177,301 z")