Lines Matching refs:result
140 /// chosen for the output. Iff boostecl is `true`, then the ECC level of the result
197 /// chosen for the output. Iff boostecl is `true`, then the ECC level of the result
242 /// chosen for the output. Iff boostecl is `true`, then the ECC level of the result
332 let mut result: QrCode = QrCode::<'a>::function_modules_marked(datacodewordsandoutbuffer, version);
333 result.draw_codewords(allcodewords);
334 result.draw_light_function_modules();
342 result.apply_mask(&funcmods, i);
343 result.draw_format_bits(ecl, i);
344 let penalty: i32 = result.get_penalty_score();
349 result.apply_mask(&funcmods, i); // Undoes the mask due to XOR
353 result.apply_mask(&funcmods, msk); // Apply the final choice of mask
354 result.draw_format_bits(ecl, msk); // Overwrite old format bits
355 result
452 let result = &mut resultbuf[ .. rawcodewords];
467 result[k] = dat[j];
472 result[k] = ecc[j];
478 result
489 let mut result = Self {
494 *result.size = size;
495 result.modules.fill(0);
498 result.fill_rectangle(6, 0, 1, size);
499 result.fill_rectangle(0, 6, size, 1);
502 result.fill_rectangle(0, 0, 9, 9);
503 result.fill_rectangle(size - 8, 0, 8, 9);
504 result.fill_rectangle(0, size - 8, 9, 8);
508 let alignpatpos: &[u8] = result.get_alignment_pattern_positions(&mut alignpatposbuf);
513 result.fill_rectangle(pos0 - 2, pos1 - 2, 5, 5);
520 result.fill_rectangle(size - 11, 0, 3, 6);
521 result.fill_rectangle(0, size - 11, 6, 3);
524 result
711 let mut result: i32 = 0;
723 result += PENALTY_N1;
725 result += 1;
730 result += runhistory.count_patterns() * PENALTY_N3;
736 result += runhistory.terminate_and_count(runcolor, runx) * PENALTY_N3;
747 result += PENALTY_N1;
749 result += 1;
754 result += runhistory.count_patterns() * PENALTY_N3;
760 result += runhistory.terminate_and_count(runcolor, runy) * PENALTY_N3;
770 result += PENALTY_N2;
781 result += k * PENALTY_N4;
782 debug_assert!(0 <= result && result <= 2568888); // Non-tight upper bound based on default values of PENALTY_N1, ..., N4
783 result
801 let result = &mut resultbuf[ .. usize::from(numalign)];
803 result[usize::from(i)] = *self.size - 7 - i * step;
805 *result.last_mut().unwrap() = 6;
806 result.reverse();
807 result
814 // The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.
817 let mut result: usize = (16 * ver + 128) * ver + 64;
820 result -= (25 * numalign - 10) * numalign - 55;
822 result -= 36;
825 debug_assert!((208 ..= 29648).contains(&result));
826 result
877 let mut result = Self {
881 assert!((1 ..= result.divisor.len()).contains(°ree), "Degree out of range");
882 let divisor: &mut [u8] = &mut result.divisor[ .. degree];
899 result
904 fn compute_remainder(&self, data: &[u8], result: &mut [u8]) {
905 assert_eq!(result.len(), self.degree);
906 result.fill(0);
908 let factor: u8 = b ^ result[0];
909 result.copy_within(1 .. , 0);
910 result[result.len() - 1] = 0;
911 for (x, &y) in result.iter_mut().zip(self.divisor.iter()) {
1215 /// An actual ECI segment can have shorter data. For non-ECI modes, the result is exact.
1227 // An actual ECI segment can have shorter data. For non-ECI modes, the result is exact.
1251 // segments at the given version. The result is None if a segment has too many
1254 let mut result: usize = 0;
1263 result = result.checked_add(4 + usize::from(ccbits))?;
1264 result = result.checked_add(seg.bitlength)?;
1266 Some(result)
1323 // in a QR Code at the given version number. The result is in the range [0, 16].