Class: SVG::Transform
- Inherits:
-
Object
- Object
- SVG::Transform
- Defined in:
- lib/transform.rb
Instance Method Summary collapse
-
#initialize(io) ⇒ Transform
constructor
A new instance of Transform.
- #matrix(a, b, c, d, e, f) ⇒ Object
- #rotate(d, x = nil, y = nil) ⇒ Object
- #scale(x, y = nil) ⇒ Object
- #skewx(a) ⇒ Object
- #skewy(a) ⇒ Object
- #translate(x, y) ⇒ Object
Constructor Details
#initialize(io) ⇒ Transform
Returns a new instance of Transform.
3 4 5 |
# File 'lib/transform.rb', line 3 def initialize(io) @io = io end |
Instance Method Details
#matrix(a, b, c, d, e, f) ⇒ Object
32 33 34 35 |
# File 'lib/transform.rb', line 32 def matrix(a,b,c,d,e,f) @io.print %(matrix(#{a} #{b} #{c} #{d} #{e} #{f}) ) self end |
#rotate(d, x = nil, y = nil) ⇒ Object
12 13 14 15 |
# File 'lib/transform.rb', line 12 def rotate(d,x=nil,y=nil) @io.print %(rotate(#{d} #{x} #{y}) ) self end |
#scale(x, y = nil) ⇒ Object
17 18 19 20 |
# File 'lib/transform.rb', line 17 def scale(x,y=nil) @io.print %(scale(#{x} #{y}) ) self end |
#skewx(a) ⇒ Object
22 23 24 25 |
# File 'lib/transform.rb', line 22 def skewx(a) @io.print %(skewX(#{a}) ) self end |
#skewy(a) ⇒ Object
27 28 29 30 |
# File 'lib/transform.rb', line 27 def skewy(a) @io.print %(skewY(#{a}) ) self end |
#translate(x, y) ⇒ Object
7 8 9 10 |
# File 'lib/transform.rb', line 7 def translate(x,y) @io.print %(translate(#{x} #{y}) ) self end |