MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fillRectangle

Function fillRectangle

modules/data/qrcode/qrcodegen.c:483–488  ·  view source on GitHub ↗

Sets every pixel in the range [left : left + width] * [top : top + height] to black.

Source from the content-addressed store, hash-verified

481
482// Sets every pixel in the range [left : left + width] * [top : top + height] to black.
483static void fillRectangle(int left, int top, int width, int height, uint8_t qrcode[]) {
484 for (int dy = 0; dy < height; dy++) {
485 for (int dx = 0; dx < width; dx++)
486 setModule(qrcode, left + dx, top + dy, true);
487 }
488}
489
490
491

Callers 1

Calls 1

setModuleFunction · 0.85

Tested by

no test coverage detected