MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / drawAlignmentPattern

Function drawAlignmentPattern

Libraries/QRCode/src/qrcode.c:299–305  ·  view source on GitHub ↗

Draws a 5*5 alignment pattern, with the center module at (x, y).

Source from the content-addressed store, hash-verified

297
298// Draws a 5*5 alignment pattern, with the center module at (x, y).
299static void drawAlignmentPattern(BitBucket *modules, BitBucket *isFunction, uint8_t x, uint8_t y) {
300 for (int8_t i = -2; i <= 2; i++) {
301 for (int8_t j = -2; j <= 2; j++) {
302 setFunctionModule(modules, isFunction, x + j, y + i, max(abs(i), abs(j)) != 1);
303 }
304 }
305}
306
307// Draws two copies of the format bits (with its own error correction code)
308// based on the given mask and this object's error correction level field.

Callers 2

drawFunctionPatternsFunction · 0.85
drawFunctionPatternsMethod · 0.85

Calls 2

setFunctionModuleFunction · 0.85
maxFunction · 0.85

Tested by 1

drawFunctionPatternsMethod · 0.68