[−][src]Function winconsole::console::fill_colors
pub fn fill_colors(
colors: (ConsoleColor, ConsoleColor),
column: u16,
row: u16,
max_length: impl Into<Option<u32>>
) -> WinResult<u32>
Fills the console window with a specified set of colors starting at a specified location, and returns the number of cells which were filled.
Arguments
colors
- The colors to fill the console with. The first item in the tuple is the foreground color, and the second item is the background color.column
- The column at which the fill should begin.row
- The row at which the fill should begin.max_length
- The maximum amount of cells to fill. If None, fill the entirety of the console from the start position.
Examples
Fills the entire console with a blue foreground and red background.
console::fill_colors((ConsoleColor::Blue, ConsoleColor::Red), 0, 0, None).unwrap();
Errors
InvalidHandleError
: Returned if an invalid handle to the console output is retrieved or used.IoError
: Returned if an OS error occurs.