Class: RubyPost::Square
Overview
Wraps teh metapost unitsquare command
Instance Attribute Summary
Attributes inherited from Path
Instance Method Summary collapse
-
#initialize ⇒ Square
constructor
A new instance of Square.
Methods inherited from Path
#add_pair, #center, #clone, #compile, #curved, #reverse, #straight
Methods inherited from Object
Constructor Details
#initialize ⇒ Square
Returns a new instance of Square.
185 186 187 188 189 190 191 192 |
# File 'lib/drawable.rb', line 185 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 |