Sha256: 2e0fc11c54bd91e1e1e3588d88341cfe228590eec35d5868f61a4ae4c786cffc
Contents?: true
Size: 628 Bytes
Versions: 9
Compression:
Stored size: 628 Bytes
Contents
# -*- coding: utf-8 -*- 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
9 entries across 9 versions & 1 rubygems