string
#
Static method for drawing cells that are filled with colors.
Used by drawQuadrille and sample.
Example #
code
let string;
function setup() {
createCanvas(180, 180);
string = createInput('hola');
}
function draw() {
background('tomato');
Quadrille.stringDisplay({ graphics: this, value: string.value(),
cellLength: width, textZoom: 0.65 });
}
Syntax #
Quadrille.stringDisplay({graphics, value, [cellLength], [textColor], [textZoom]})
Parameters #
parameter | description |
---|---|
graphics | p5.Graphics: renderer target |
value | p5.Color: cell contents |
cellLength | Number: edge length in pixels default is Quadrille.cellLength |
textColor | p5.Color representation: text color default is Quadrille.textColor |
textZoom | Number:: text zoom level default is Quadrille.textZoom |