Draws a 5*5 alignment pattern, with the center module at (x, y).
| 297 | |
| 298 | // Draws a 5*5 alignment pattern, with the center module at (x, y). |
| 299 | static 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. |