Class: DemCurves::Line
- Inherits:
-
PathElement
- Object
- PathElement
- DemCurves::Line
- Defined in:
- lib/core/path-element.rb
Instance Attribute Summary
Attributes inherited from PathElement
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(start_point, center_point, end_point) ⇒ Line
constructor
A new instance of Line.
Methods inherited from PathElement
#[], #[]=, #get_control, #set_control
Constructor Details
#initialize(start_point, center_point, end_point) ⇒ Line
Returns a new instance of Line.
77 78 79 80 81 82 |
# File 'lib/core/path-element.rb', line 77 def initialize(start_point, center_point, end_point) super({ :start => start_point, :center => center_point, :end => end_point}) end |
Instance Method Details
#generate ⇒ Object
84 85 86 |
# File 'lib/core/path-element.rb', line 84 def generate @path_points = [self[:start].loc, self[:end].loc] end |