Sha256: c4e04404edf4fb475675d5e8f8fe193f98064cb56e2a9fd340a86fba7fd8a9f6
Contents?: true
Size: 600 Bytes
Versions: 12
Compression:
Stored size: 600 Bytes
Contents
require 'rays/ext' module Rays class Polygon class Line < Polyline def initialize(*points, loop: true, hole: false) setup points, loop, hole end def transform(matrix = nil, loop: loop?, hole: hole?, &block) points = to_a points = points.map {|point| matrix * point} if matrix points = block.call points if block self.class.new(*points, loop: loop, hole: hole) end def inspect() "#<Rays::Polygon::Line #{to_a.join ', '}, loop: #{loop?}, hole: #{hole?}>" end end# Line end# Polygon end# Rays
Version data entries
12 entries across 12 versions & 1 rubygems