Class: Knot::Path

Inherits:
Object
  • Object
show all
Defined in:
lib/knot/path.rb

Overview

Instance Method Summary collapse

Constructor Details

#initializePath

Returns a new instance of Path.



6
7
8
# File 'lib/knot/path.rb', line 6

def initialize
  @path = []
end

Instance Method Details

#a(rx, ry, x_axis_rotation, large_arc, sweep, m) ⇒ Object



30
31
32
# File 'lib/knot/path.rb', line 30

def a(rx, ry, x_axis_rotation, large_arc, sweep, m)
  @path.push __method__, rx, ry, x_axis_rotation, large_arc, sweep, m.x, m.y
end

#A(rx, ry, x_axis_rotation, large_arc, sweep, m) ⇒ Object



26
27
28
# File 'lib/knot/path.rb', line 26

def A(rx, ry, x_axis_rotation, large_arc, sweep, m)
  @path.push __method__, rx, ry, x_axis_rotation, large_arc, sweep, m.x, m.y
end

#L(m) ⇒ Object



18
19
20
# File 'lib/knot/path.rb', line 18

def L(m)
  @path.push __method__, m.x, m.y
end

#l(m) ⇒ Object



22
23
24
# File 'lib/knot/path.rb', line 22

def l(m)
  @path.push __method__, m.x, m.y
end

#M(m) ⇒ Object



10
11
12
# File 'lib/knot/path.rb', line 10

def M(m)
  @path.push __method__, m.x, m.y
end

#m(m) ⇒ Object



14
15
16
# File 'lib/knot/path.rb', line 14

def m(m)
  @path.push __method__, m.x, m.y
end

#zObject



34
35
36
37
# File 'lib/knot/path.rb', line 34

def z
  @path.push 'z'
  @path.join(' ')
end