Class: DemCurves::Line

Inherits:
PathElement show all
Defined in:
lib/core/path-element.rb

Instance Attribute Summary

Attributes inherited from PathElement

#control_points, #path_points

Instance Method Summary collapse

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

#generateObject



84
85
86
# File 'lib/core/path-element.rb', line 84

def generate
  @path_points = [self[:start].loc, self[:end].loc]
end