Method: Origami::Graphics::Path#close!

Defined in:
lib/origami/graphics/path.rb

#close!Object



83
84
85
86
87
88
89
90
# File 'lib/origami/graphics/path.rb', line 83

def close!
    from = @current_point
    to = @segments.first.from

    @segments << Line.new(from, to)
    @segments.freeze
    @closed = true
end