Lines Matching refs:dark
98 /// Instances of this struct represent an immutable square grid of dark and light cells.
136 // The modules of this QR Code (false = light, true = dark).
355 /// which is `false` for light or `true` for dark.
444 self.set_function_module(8, size - 8, true); // Always dark
681 // Balance of dark and light modules
682 let dark: i32 = self.modules.iter().copied().map(i32::from).sum();
683 let total: i32 = size * size; // Note that size is odd, so dark/total != 1/2
684 // Compute the smallest integer k >= 0 such that (45-5k)% <= dark/total <= (55+5k)%
685 let k: i32 = ((dark * 20 - total * 10).abs() + total - 1) / total - 1;
849 if currentruncolor { // Terminate dark run