Skip to content

Commit

Permalink
Make look cooler.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmagick committed May 21, 2008
1 parent ed6a980 commit b61ac82
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions doc/ex/wet_floor.rb
Expand Up @@ -5,22 +5,22 @@

results = Magick::ImageList.new

img = Magick::Image.new(270, 60)
img = Magick::Image.new(270, 60) {self.background_color = "black" }

gc = Magick::Draw.new
gc.annotate(img, 0, 0, 0, -15, "RUBY!") do
gc.fill = '#c00'
gc.stroke = 'black'
gc.fill = '#a00'
gc.stroke = '#f00'
gc.stroke_width = 2
gc.font_weight = Magick::BoldWeight
gc.gravity = Magick::SouthGravity
if RUBY_PLATFORM =~ /mswin32/
gc.font_family = "Georgia"
gc.pointsize = 76
else
gc.font_family = "times"
gc.pointsize = 80
end
if RUBY_PLATFORM =~ /mswin32/
gc.font_family = "Georgia"
gc.pointsize = 76
else
gc.font_family = "times"
gc.pointsize = 80
end
end

# Add a little bit of shading
Expand All @@ -46,14 +46,14 @@
results << ilist.append(true)

# Add a ripple
ilist[1] = ilist[1].rotate(90).wave(2, 20).rotate(-90)
ilist[1] = ilist[1].rotate(90).wave(2, 10).rotate(-90)
results << ilist.append(true)

# Montage into a single demo image. Use a white background so
# there won't be any problems with transparency in the browser.
result = results.montage do
self.geometry = '270x120'
self.tile = '1x4'
self.background_color = 'white'
self.background_color = 'black'
end
result.write('wet_floor.gif')

0 comments on commit b61ac82

Please sign in to comment.