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

Method drawFinderPattern

Libraries/QRCode/tests/QrCode.cpp:275–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273
274
275void qrcodegen::QrCode::drawFinderPattern(int x, int y) {
276 for (int i = -4; i <= 4; i++) {
277 for (int j = -4; j <= 4; j++) {
278 int dist = std::max(std::abs(i), std::abs(j)); // Chebyshev/infinity norm
279 int xx = x + j, yy = y + i;
280 if (0 <= xx && xx < size && 0 <= yy && yy < size)
281 setFunctionModule(xx, yy, dist != 2 && dist != 4);
282 }
283 }
284}
285
286
287void qrcodegen::QrCode::drawAlignmentPattern(int x, int y) {

Callers

nothing calls this directly

Calls 2

maxFunction · 0.85
setFunctionModuleFunction · 0.85

Tested by

no test coverage detected