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

Function setModuleBounded

modules/data/qrcode/qrcodegen.c:682–686  ·  view source on GitHub ↗

Sets the module at the given coordinates, doing nothing if out of bounds.

Source from the content-addressed store, hash-verified

680
681// Sets the module at the given coordinates, doing nothing if out of bounds.
682testable void setModuleBounded(uint8_t qrcode[], int x, int y, bool isBlack) {
683 int qrsize = qrcode[0];
684 if (0 <= x && x < qrsize && 0 <= y && y < qrsize)
685 setModule(qrcode, x, y, isBlack);
686}
687
688
689

Callers 1

drawWhiteFunctionModulesFunction · 0.85

Calls 1

setModuleFunction · 0.85

Tested by

no test coverage detected