lib/glimmer/libui/shape/polyline.rb in glimmer-dsl-libui-0.11.5 vs lib/glimmer/libui/shape/polyline.rb in glimmer-dsl-libui-0.11.6
- old
+ new
@@ -43,9 +43,10 @@
def move_by(x_delta, y_delta)
self.point_array = point_array.each_with_index.map {|coordinate, i| i.even? ? coordinate + x_delta : coordinate + y_delta}
end
def perfect_shape
+ require 'perfect-shape'
the_perfect_shape_dependencies = perfect_shape_dependencies
if the_perfect_shape_dependencies != @perfect_shape_dependencies
absolute_point_array = @perfect_shape_dependencies = the_perfect_shape_dependencies
path_shapes = [absolute_point_array.first]
path_shapes += absolute_point_array.drop(1).map { |point| PerfectShape::Line.new(points: [point]) }