toImage #
Returns a p5.Image representation of this quadrille.
Syntax #
toImage(filename, [{[values], [tileDisplay], [imageDisplay], [colorDisplay], [stringDisplay], [numberDisplay], [arrayDisplay], [objectDisplay], [cellLength], [outlineWeight], [outline], [textColor], [textZoom]}])
Parameters #
parameter | description |
---|---|
filename | String: image name, png and jpg extensions are supported |
tileDisplay | Function: empty cell drawing custom procedure default is Quadrille.tileDisplay1. Use 0 , null or undefined to discard all edges |
imageDisplay | Function: image filled cell drawing custom procedure default is Quadrille.imageDisplay |
colorDisplay | Function: color filled cell drawing custom procedure default is Quadrille.colorDisplay |
stringDisplay | Function: string filled cell drawing custom procedure default is Quadrille.stringDisplay |
numberDisplay | Function: number filled cell drawing custom procedure default is Quadrille.numberDisplay |
arrayDisplay | Function: array filled cell drawing custom procedure |
objectDisplay | Function: object filled cell drawing custom procedure |
values | Iterable: cells to be exported. All cells are exported if this parameter is undefined |
cellLength | Number: edge length in pixels default is Quadrille.cellLength |
outlineWeight | Number: edge weight default is Quadrille.outlineWeight. |
outline | p5.Color representation: edge color default is Quadrille.outline |
textColor | p5.Color representation: text color default is Quadrille.textColor |
textZoom | Number:: text zoom level default is Quadrille.textZoom |
This function allows to implementing other regular tilings different than the default square tiling. ↩︎