Constructor
new Zentangle(size, shape, options)
Create a Zentangle object.
Parameters:
Name | Type | Description |
---|---|---|
size |
number | The size of the Zentangle in pixels. There is only one number, as Zentagles are a square or a triangle (in which case size is the length of the side), or a circle (in which case the size is the diameter.) |
shape |
string | The shape of the Zentangle. Can be 'square' (the default), 'triangle' or 'circle'. |
options |
ZentangleOptions |
- Source:
Methods
addTangle(tangle)
Add a tangle to this Zentangle.
Parameters:
Name | Type | Description |
---|---|---|
tangle |
Tangle | The pattern to draw in this area. |
- Source:
draw()
Draw the complete Zentangle on the canvas.
- Source:
getFullMask() → {Array.<Point>}
Get a mask covering the entire Zentangle.
- Source:
Returns:
A rectangular mask covering the entire Zentangle canvas.
- Type
- Array.<Point>