Sha256: f63f915d0c69163f64bc85e8a8d95eb7c9261a21cd66b982690f8087493b816f

Contents?: true

Size: 656 Bytes

Versions: 1

Compression:

Stored size: 656 Bytes

Contents

module Straightedge
  #
  # a mark is an "indicated" point with an optional color
  # the idea is for it to be a thin wrapper around the 
  # vector arrays that are going to be so common
  #
  # so calling .to_point on an array will give you a mark
  # and hence #x/#y accessors (equivalently #width/#height)
  # on simple vectors
  #
  # where you could instantiate a mark, try to just use 
  # a vector and push the calculation as far west as
  # possible
  #
  class Mark
    attr_reader :color, :x, :y

    alias :width :x
    alias :height :y

    def initialize(*args,color: :black)
      @x, @y = *args # x, y
      @color = color
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
straightedge-0.1.0 lib/straightedge/mark.rb