class ShapeFactory
package geometrize.shape
Helper class for creating shapes.
Static methods
staticcreate (type:ShapeType, xBound:Int, yBound:Int):Shape
Creates a new shape of the specified type.
Parameters:
type | The type of shape to create. |
---|---|
xBound | The x-bound of the whole canvas. |
yBound | The y-bound of the whole canvas. |
Returns:
The new shape.
staticrandomShape (xBound:Int, yBound:Int):Shape
Creates a new random shape.
Parameters:
xBound | The x-bound of the whole canvas. |
---|---|
yBound | The y-bound of the whole canvas. |
Returns:
The new shape.
staticrandomShapeOf (types:Array<ShapeType>, xBound:Int, yBound:Int):Shape
Creates a random shape from the types supplied.
Parameters:
types | The types of shape to possibly create. |
---|---|
xBound | The x-bound of the whole canvas. |
yBound | The y-bound of the whole canvas. |
Returns:
The new shape.