Method: Magick::RVG::Transformable#matrix

Defined in:
lib/rvg/transformable.rb

#matrix(sx, rx, ry, sy, tx, ty) {|_self| ... } ⇒ Object

Applies the transformation matrix [sx, rx, ry, sy, tx, ty]

Yields:

  • (_self)

Yield Parameters:

[View source]

46
47
48
49
50
51
52
53
54
# File 'lib/rvg/transformable.rb', line 46

def matrix(sx, rx, ry, sy, tx, ty)
    begin
        @transforms << [:affine, [Float(sx), Float(rx), Float(ry), Float(sy), Float(tx), Float(ty)]]
    rescue ArgumentError
        raise ArgumentError, "arguments must be convertable to float (got #{sx.class}, #{rx.class}, #{ry.class}, #{sy.class}, #{sx.class}, #{sx.class}, #{tx.class}, #{ty.class})"
    end
    yield(self) if block_given?
    self
end