Permalink
Browse files

Change to use Geometry objects instead of geometry strings

  • Loading branch information...
1 parent 5874992 commit a53c76d8d5a190b67083a3e7a4fcde444771f521 rmagick committed Dec 16, 2003
Showing with 5 additions and 5 deletions.
  1. +2 −2 doc/ex/demo.rb
  2. +2 −2 doc/ex/stegano.rb
  3. +1 −1 doc/ex/to_blob.rb
View
@@ -149,7 +149,7 @@
# the same size as the model image.
puts " gradient..."
example.read("gradient:#20a0ff-#ffff00") {
- self.size = sprintf("%ux%u", model.columns, model.rows)
+ self.size = Geometry.new(model.columns, model.rows)
}
example.cur_image[:Label] = "Gradient"
@@ -188,7 +188,7 @@
# The plasma format is very similar to the gradient format, above.
puts " plasma..."
example.read("plasma:fractal") {
- self.size = sprintf("%ux%u", model.columns, model.rows)
+ self.size = Geometry.new(model.columns, model.rows)
}
example.cur_image[:Label] = "Plasma"
View
@@ -34,7 +34,7 @@
}
Magick.set_monitor(monitor)
stegano = Magick::Image.read('stegano:jj.png') {
- self.size = "#{wmcols}x#{wmrows}+91"
+ self.size = Magick::Geometry.new(wmcols, wmrows, 91)
}
Magick.set_monitor(nil)
@@ -45,7 +45,7 @@
stegano[0].write('stegano.gif')
rescue Magick::ImageMagickError
- puts "#{$0}: ImageMagickError - #{$!}"
+ puts "#{$0}: ImageMagickError - #{$!}"
end
exit
View
@@ -10,7 +10,7 @@
f2 = Magick::Image.from_blob(blob) {
self.format = format
- self.size = sprintf("%dx%d", rows, cols)
+ self.size = Magick::Geometry.new(rows, cols)
self.depth = depth
}
#f2[0].display

0 comments on commit a53c76d

Please sign in to comment.