Lines Matching refs:dark
103 /// Instances of this struct represent an immutable square grid of dark and light cells.
124 // The modules of this QR Code (0 = light, 1 = dark), packed bitwise into bytes.
393 /// which is `false` for light or `true` for dark.
485 // version's size, then marks every function module as dark.
528 // Draws light function modules and possibly some dark modules onto this QR Code, without changing
530 // marked dark (namely by function_modules_marked()), because this may skip redrawing dark function modules.
594 // the format bits, unlike draw_light_function_modules() which might skip dark modules.
627 self.set_module_bounded(8, size - 8, true); // Always dark
631 // Sets every module in the range [left : left + width] * [top : top + height] to dark.
644 // the QR Code to be dark at function modules and light at codeword modules (including unused remainder bits).
775 // Balance of dark and light modules
776 let dark = self.modules.iter().map(|x| x.count_ones()).sum::<u32>() as i32;
777 let total = i32::from(size) * i32::from(size); // Note that size is odd, so dark/total != 1/2
778 // Compute the smallest integer k >= 0 such that (45-5k)% <= dark/total <= (55+5k)%
779 let k: i32 = ((dark * 20 - total * 10).abs() + total - 1) / total - 1;
975 if currentruncolor { // Terminate dark run