fn calculate_tile_data(&self, tile: &Tile) -> RECT {
        let column_width = self.width / self.columns;
        let row_height = self.height / self.rows;

        let mut x = 0;
        let mut y = 0;
        let mut height = self.height;
        let mut width = self.width;

        if let Some(column) = tile.column {
            width = column_width;
            x += column_width * (column - 1);

            if column > 1 {
                width -= CONFIG.padding;
                x += CONFIG.padding;
            }
        }

        if let Some(row) = tile.row {
            height = row_height;
            y = row_height * (row - 1);

            if row > 1 {
                // height -= CONFIG.padding;
                y += CONFIG.padding;
            }
        }

        x += CONFIG.margin;
        x += CONFIG.padding;
        y += CONFIG.margin;
        y += CONFIG.padding;


        tile.window.calculate_window_rect(x, y, width, height)
    }
/// Calculates all the data required for drawing the tile

Calculates all the data required for drawing the tile
Calculates all the data required for drawing the tile
fn calculate_tile_data(&self, tile: &Tile) -> RECT {
        let column_width = self.width / self.columns;
        let row_height = self.height / self.rows;
        let mut x = 0;
        let mut y = 0;
        let mut height = self.height;
        let mut width = self.width;
        if let Some(column) = tile.column {
            width = column_width;
            x += column_width * (column - 1);
            if column > 1 {
                width -= CONFIG.padding;
                x += CONFIG.padding;
            }
        }
        if let Some(row) = tile.row {
            height = row_height;
            y = row_height * (row - 1);
            if row > 1 {
                // height -= CONFIG.padding;
                y += CONFIG.padding;
            }
        }
        x += CONFIG.margin;
        x += CONFIG.padding;
        y += CONFIG.margin;
        y += CONFIG.padding;
        tile.window.calculate_window_rect(x, y, width, height)
    }
fn calculate_tile_data ( & self , tile : & Tile ) -> RECT { let column_width = self . width / self . columns ; let row_height = self . height / self . rows ; let mut x = 0 ; let mut y = 0 ; let mut height = self . height ; let mut width = self . width ; if let Some ( column ) = tile . column { width = column_width ; x += column_width * ( column - 1 ) ; if column > 1 { width -= CONFIG . padding ; x += CONFIG . padding ; } } if let Some ( row ) = tile . row { height = row_height ; y = row_height * ( row - 1 ) ; if row > 1 { // height -= CONFIG.padding;
 y += CONFIG . padding ; } } x += CONFIG . margin ; x += CONFIG . padding ; y += CONFIG . margin ; y += CONFIG . padding ; tile . window . calculate_window_rect ( x , y , width , height ) }
Calculates all the data required for drawing the tile
Calculates all the data required for drawing the tile
&self
tile
&Tile
&self
tile
&Tile