[−][src]Function winconsole::console::move_contents
pub fn move_contents(
scroll: Rect,
dest: Vector2<i16>,
clip: impl Into<Option<Rect>>,
fill_char: impl Into<Option<char>>,
fill_fg_color: impl Into<Option<ConsoleColor>>,
fill_bg_color: impl Into<Option<ConsoleColor>>
) -> WinResult<()>
Moves data from a rectangle of the console output to another point in the output. The effects of the move can be limited by specifying a clipping rectangle, so the contents of the console screen buffer outside the clipping rectangle are unchanged.
Arguments
scroll
- The rectangle to be moved.dest
- The upper-left corner of the new location of the contents.clip
- An optional clipping rectangle.fill_char
- A character to fill in spaces which were left empty as a result of the move.fill_fg_color
- The foreground to fill in spaces which were left empty as a result of the move.fill_bg_color
- The background to fill in spaces which were left empty as a result of the move.
Examples
let scroll = Rect::new(0, 0, 10, 10); let dest = Vector2::new(0, 3); console::move_contents(scroll, dest, None, None, None, None).unwrap();
Errors
InvalidHandleError
: Returned if an invalid handle to the console output is retrieved or used.IoError
: Returned if an OS error occurs.