Geometry Pack

Shape:

Determines a visible object, described by a specific geometry. Attributes:

Methods:

Example:

var star = new Shape(new Polygon(50, 5, true), new Point(0, 0), new Color(0, 0, 255, 1));
star.draw(canvas);

Geometries:

Point:

2D Spatial point. Attributes:

Methods:

Rect:

Rect between two points. Attributes:

Methods:

Circle:

Circle geometry. Attributes:

Methods:

Rectangle:

Rectangle geometry. Attributes:

Polygon:

Polygon geometry. Attributes:

Heart:

Heart geometry.

Methods:

Colors

Color

Simple color element. Attributes:

Methods:

Gradient

Gradient color element. Attributes:

Methods:

GenericObject

Every element is child of the Generic Object. That allow you to clone an object without breaking references, get an String that represent it, trace it on console and compare it with another object.