Sha256: 3b83ac59d03d920a48d4da6ee91cda849d240f9103f2c540d9bf9b960c5e2a05
Contents?: true
Size: 626 Bytes
Versions: 13
Compression:
Stored size: 626 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
13 entries across 13 versions & 1 rubygems