Method: Magick::RVG::Transformable#scale
- Defined in:
- lib/rvg/transformable.rb
permalink #scale(sx, sy = nil) {|_self| ... } ⇒ Object
Multiply the x-coordinates by sx
and the y-coordinates by sy
. If sy
is omitted it defaults to sx
.
72 73 74 75 76 77 78 79 80 81 |
# File 'lib/rvg/transformable.rb', line 72 def scale(sx, sy=nil) sy ||= sx begin @transforms << [:scale, [Float(sx), Float(sy)]] rescue ArgumentError raise ArgumentError, "arguments must be convertable to float (got #{sx.class}, #{sy.class})" end yield(self) if block_given? self end |