Tile Display

tileDisplay #

Static method for drawing cell tiles.

Used by drawQuadrille.

Example #

code
function setup() {
  createCanvas(105, 105);
}

function draw() {
  background('yellow');
  Quadrille.tileDisplay( { graphics: this, outlineWeight: 9 } );
}

Syntax #

Quadrille.tileDisplay({graphics, [col], [row], [width], [height], [cellLength], [outline], [outlineWeight]})

Parameters #

parameterdescription
graphicsp5.Graphics: renderer target
colNumber: cell col number [0..width] default is 0
rowNumber: cell row number [0..height] default is 0
widthNumber: total number of columns default is 1
heightNumber: total number of rows default is 1
cellLengthNumber: edge length in pixels default is Quadrille.cellLength
outlinep5.Color representation: edge color default is Quadrille.outline
outlineWeightNumber: edge weight default is Quadrille.outlineWeight. Use 0 to discard all edges