Class: VectorSalad::StandardShapes::Square

Inherits:
Rect show all
Defined in:
lib/vector_salad/standard_shapes/square.rb

Overview

Square shape with equal width and height.

Instance Attribute Summary

Attributes inherited from Rect

#height, #width

Attributes inherited from BasicShape

#options

Instance Method Summary collapse

Methods inherited from Rect

#to_path, #to_svg

Methods included from Mixins::At

#[], #at, #at=, #move

Methods inherited from BasicShape

#flip, #flip_x, #flip_y, #jitter, #move, #rotate, #scale, #to_a, #to_bezier_path, #to_cubic_path, #to_multi_path, #to_path, #to_simple_path, #to_svg

Constructor Details

#initialize(size, **options) ⇒ Square

Returns a new instance of Square.



12
13
14
15
# File 'lib/vector_salad/standard_shapes/square.rb', line 12

def initialize(size, **options)
  super(size, size, **options)
  self
end