Class: RubyPost::Square

Inherits:
Path show all
Defined in:
lib/drawable.rb

Overview

Wraps teh metapost unitsquare command

Instance Attribute Summary

Attributes inherited from Path

#line_type

Instance Method Summary collapse

Methods inherited from Path

#add_pair, #center, #clone, #compile, #curved, #reverse, #straight

Methods inherited from Object

#compile

Constructor Details

#initializeSquare

Returns a new instance of Square.



175
176
177
178
179
180
181
182
# File 'lib/drawable.rb', line 175

def initialize
  super()
  @p.push(Pair.new(-0.5,-0.5))
  @p.push(Pair.new(-0.5,0.5))
  @p.push(Pair.new(0.5,0.5))
  @p.push(Pair.new(0.5,-0.5))
  @p.push('cycle')
end