Clears the cursor at the current position by restoring the contents of the screen saved by an earlier call to `draw_cursor`. Does not present the canvas.
(&mut self)
| 407 | /// |
| 408 | /// Does not present the canvas. |
| 409 | fn clear_cursor(&mut self) -> io::Result<()> { |
| 410 | if !self.cursor_visible || self.cursor_backup.is_none() { |
| 411 | return Ok(()); |
| 412 | } |
| 413 | |
| 414 | let x1y1 = self.cursor_pos.clamped_mul(self.glyph_size); |
| 415 | |
| 416 | self.raster_ops.put_pixels(x1y1, self.cursor_backup.as_ref().unwrap())?; |
| 417 | self.cursor_backup = None; |
| 418 | Ok(()) |
| 419 | } |
| 420 | |
| 421 | /// Moves the cursor to beginning of the next line, scrolling the console if necessary. |
| 422 | /// |
no test coverage detected