Class: Savage::Directions::PointTarget

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

Instance Method Summary collapse

Instance Method Details

#absoluteObject



19
20
21
# File 'lib/monkeypatchsavage.rb', line 19

def absolute
  return @absolute
end

#setAbsolute(ab) ⇒ Object



23
24
25
# File 'lib/monkeypatchsavage.rb', line 23

def setAbsolute(ab)
  @absolute = ab
end

#toAbsolute(fromPoint) ⇒ Object

change target and control points, and return new target point



10
11
12
13
14
15
16
17
# File 'lib/monkeypatchsavage.rb', line 10

def toAbsolute(fromPoint) #change target and control points, and return new target point
  if not @absolute
    @target.x += fromPoint.x
    @target.y += fromPoint.y
  end
  @absolute = true
  return Point.new(@target.x,@target.y)
end