Lines Matching defs:dark
417 // version's size, then marks every function module as dark.
452 // Draws light function modules and possibly some dark modules onto the given QR Code, without changing
454 // marked dark (namely by initializeFunctionModules()), because this may skip redrawing dark function modules.
515 // the format bits, unlike drawLightFunctionModules() which might skip dark modules.
542 setModuleBounded(qrcode, 8, qrsize - 8, true); // Always dark
563 // Sets every module in the range [left : left + width] * [top : top + height] to dark.
576 // the QR Code to be dark at function modules and light at codeword modules (including unused remainder bits).
590 bool dark = getBit(data[i >> 3], 7 - (i & 7));
591 setModuleBounded(qrcode, x, y, dark);
696 // Balance of dark and light modules
697 int dark = 0;
701 dark++;
704 int total = qrsize * qrsize; // Note that size is odd, so dark/total != 1/2
705 // Compute the smallest integer k >= 0 such that (45-5k)% <= dark/total <= (55+5k)%
706 int k = (int)((labs(dark * 20L - total * 10L) + total - 1) / total) - 1;
720 // The maximum QR Code size is 177, hence the dark run length n <= 177.
729 if (currentRunColor) { // Terminate dark run