Class: Geometry.Shapes.Square

Geometry Square Shape Class

Summary:
  • Represents a square drawn on a grid

This class extends the rectangle shape to draw a square on the grid

Usage

Constructs an instance of Square with sides of supplied size and origin

                    
                        new Geometry.Shapes.Square(size, originopt)
                    
                
Parameters:
Name Type Default Description
size Number

how tall and wide the square's sides should be

originopt Geometry.Utils.Point new Point(0, 0)

which point on the grid to start the square from

Properties:
Name Type Description
width Number

the horizontal width of the rectangle

height Number

the vertical height of the rectangle