Lines Matching defs:size

29 //! Secondary goals are compact implementation size and good documentation comments.
80 //! for y in 0 .. qr.size() {
81 //! for x in 0 .. qr.size() {
119 // This determines the size of this barcode.
124 size: i32,
134 // Grids of modules/pixels, with dimensions of size*size:
287 let size = usize::from(ver.value()) * 4 + 17;
290 size: size as i32,
293 modules : vec![false; size * size], // Initially all light
294 isfunction: vec![false; size * size],
336 /// Returns this QR Code's size, in the range [21, 177].
337 pub fn size(&self) -> i32 {
338 self.size
360 (0 .. self.size).contains(&x) && (0 .. self.size).contains(&y) && self.module(x, y)
366 self.modules[(y * self.size + x) as usize]
372 &mut self.modules[(y * self.size + x) as usize]
381 let size: i32 = self.size;
382 for i in 0 .. size {
389 self.draw_finder_pattern(size - 4, 3);
390 self.draw_finder_pattern(3, size - 4);
437 let size: i32 = self.size;
439 self.set_function_module(size - 1 - i, 8, get_bit(bits, i));
442 self.set_function_module(8, size - 15 + i, get_bit(bits, i));
444 self.set_function_module(8, size - 8, true); // Always dark
469 let a: i32 = self.size - 11 + i % 3;
484 if (0 .. self.size).contains(&xx) && (0 .. self.size).contains(&yy) {
508 self.isfunction[(y * self.size + x) as usize] = true;
565 let mut right: i32 = self.size - 1;
570 for vert in 0 .. self.size { // Vertical counter
574 let y: i32 = if upward { self.size - 1 - vert } else { vert }; // Actual y coordinate
575 if !self.isfunction[(y * self.size + x) as usize] && i < data.len() * 8 {
595 for y in 0 .. self.size {
596 for x in 0 .. self.size {
608 *self.module_mut(x, y) ^= invert & !self.isfunction[(y * self.size + x) as usize];
618 let size: i32 = self.size;
621 for y in 0 .. size {
624 let mut runhistory = FinderPenalty::new(size);
625 for x in 0 .. size {
645 for x in 0 .. size {
648 let mut runhistory = FinderPenalty::new(size);
649 for y in 0 .. size {
670 for y in 0 .. size-1 {
671 for x in 0 .. size-1 {
683 let total: i32 = size * size; // Note that size is odd, so dark/total != 1/2
707 |i| self.size - 7 - i * step).collect();
815 pub fn new(size: i32) -> Self {
817 qr_size: size,