Tool to create and manage canvas 2d objects.
Maur.set(settings);
It defines initial options.
Property | Description |
---|---|
canvas | A canvas HTML element where it will be rendered |
It clears all canvas.
It verifies if mouse is over an object. It returns a boolean
.
Common options:
Property | Description |
---|---|
rotate | The rotation of the object |
horizontalAlign | Only for rect and square objects. A horizontal align of the object. Possible values arecenter or right |
verticalAlign | Only for rect and square objects. A vertical align of the object. Possible values are center or bottom |
backgroundColor | A background color of the object |
It creates an arc.
Property | Description |
---|---|
radius | The radius of the arc |
angle0 | Initial angle |
angle1 | Final angle |
It creates a circle.
Property | Description |
---|---|
radius | The radius of the circle |
It creates a rectangle.
Property | Description |
---|---|
width | The width of the rectangle |
height | The height of the rectangle |
It creates a rectangle.
Property | Description |
---|---|
width | The width of the square |