fn draw_function_patterns(&mut self) {
        // Draw horizontal and vertical timing patterns
        let size: i32 = self.size;
        for i in 0..size {
            self.set_function_module(6, i, i % 2 == 0);
            self.set_function_module(i, 6, i % 2 == 0);
        }

        // Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules)
        self.draw_finder_pattern(3, 3);
        self.draw_finder_pattern(size - 4, 3);
        self.draw_finder_pattern(3, size - 4);

        // Draw numerous alignment patterns
        let alignpatpos: Vec<i32> = self.get_alignment_pattern_positions();
        let numalign: usize = alignpatpos.len();
        for i in 0..numalign {
            for j in 0..numalign {
                // Don't draw on the three finder corners
                if !(i == 0 && j == 0 || i == 0 && j == numalign - 1 || i == numalign - 1 && j == 0)
                {
                    self.draw_alignment_pattern(alignpatpos[i], alignpatpos[j]);
                }
            }
        }

        // Draw configuration data
        self.draw_format_bits(Mask::new(0)); // Dummy mask value; overwritten later in the constructor
        self.draw_version();
    }
// Reads this object's version field, and draws and marks all function modules.
Reads this object's version field, and draws and marks all function modules.
Reads this object ' s version field and draws and marks all function modules .
fn draw_function_patterns(&mut self) {
        // Draw horizontal and vertical timing patterns
        let size: i32 = self.size;
        for i in 0..size {
            self.set_function_module(6, i, i % 2 == 0);
            self.set_function_module(i, 6, i % 2 == 0);
        }
        // Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules)
        self.draw_finder_pattern(3, 3);
        self.draw_finder_pattern(size - 4, 3);
        self.draw_finder_pattern(3, size - 4);
        // Draw numerous alignment patterns
        let alignpatpos: Vec<i32> = self.get_alignment_pattern_positions();
        let numalign: usize = alignpatpos.len();
        for i in 0..numalign {
            for j in 0..numalign {
                // Don't draw on the three finder corners
                if !(i == 0 && j == 0 || i == 0 && j == numalign - 1 || i == numalign - 1 && j == 0)
                {
                    self.draw_alignment_pattern(alignpatpos[i], alignpatpos[j]);
                }
            }
        }
        // Draw configuration data
        self.draw_format_bits(Mask::new(0)); // Dummy mask value; overwritten later in the constructor
        self.draw_version();
    }
fn draw_function_patterns ( & mut self ) { // Draw horizontal and vertical timing patterns let size : i32 = self . size ; for i in 0 .. size { self . set_function_module ( 6 , i , i % 2 == 0 ) ; self . set_function_module ( i , 6 , i % 2 == 0 ) ; } // Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules) self . draw_finder_pattern ( 3 , 3 ) ; self . draw_finder_pattern ( size - 4 , 3 ) ; self . draw_finder_pattern ( 3 , size - 4 ) ; // Draw numerous alignment patterns let alignpatpos : Vec < i32 > = self . get_alignment_pattern_positions ( ) ; let numalign : usize = alignpatpos . len ( ) ; for i in 0 .. numalign { for j in 0 .. numalign { // Don't draw on the three finder corners if ! ( i == 0 && j == 0 || i == 0 && j == numalign - 1 || i == numalign - 1 && j == 0 ) { self . draw_alignment_pattern ( alignpatpos [ i ] , alignpatpos [ j ] ) ; } } } // Draw configuration data self . draw_format_bits ( Mask :: new ( 0 ) ) ; // Dummy mask value; overwritten later in the constructor self . draw_version ( ) ; }
Reads this object's version field, and draws and marks all function modules.
Reads this object ' s version field and draws and marks all function modules .
&mut self