Gradient getting brighter from top to bottom
()
| 255 | |
| 256 | /// Gradient getting brighter from top to bottom |
| 257 | pub fn gradient() -> Grid { |
| 258 | let gradient_drop = 1; // Brightness drop between rows |
| 259 | let mut grid = Grid::default(); |
| 260 | for y in 0..HEIGHT { |
| 261 | for x in 0..WIDTH { |
| 262 | grid.0[x][y] = (gradient_drop * (y + 1)) as u8; |
| 263 | } |
| 264 | } |
| 265 | grid |
| 266 | } |
| 267 | |
| 268 | /// Fill a percentage of the rows from the bottom up |
| 269 | pub fn percentage(percentage: u16) -> Grid { |