fn fill_rect(&self, rect: &Rectangle, color: RgbColor) {
        let info = self.info();
        let left = rect.x.min(info.width);
        let right = (left + rect.width).min(info.width);
        let top = rect.y.min(info.height);
        let bottom = (top + rect.height).min(info.height);
        for j in top..bottom {
            for i in left..right {
                self.draw_pixel(i, j, color);
            }
        }
    }
/// Fill a given rectangle with `color`.
Fill a given rectangle with `color`.
Fill a given rectangle with ` color ` .
fn fill_rect(&self, rect: &Rectangle, color: RgbColor) {
        let info = self.info();
        let left = rect.x.min(info.width);
        let right = (left + rect.width).min(info.width);
        let top = rect.y.min(info.height);
        let bottom = (top + rect.height).min(info.height);
        for j in top..bottom {
            for i in left..right {
                self.draw_pixel(i, j, color);
            }
        }
    }
fn fill_rect ( & self , rect : & Rectangle , color : RgbColor ) { let info = self . info ( ) ; let left = rect . x . min ( info . width ) ; let right = ( left + rect . width ) . min ( info . width ) ; let top = rect . y . min ( info . height ) ; let bottom = ( top + rect . height ) . min ( info . height ) ; for j in top .. bottom { for i in left .. right { self . draw_pixel ( i , j , color ) ; } } }
Fill a given rectangle with `color`.
Fill a given rectangle with ` color ` .
&self
rect
&Rectangle
color
RgbColor
&self
rect
&Rectangle
color
RgbColor