MCPcopy Create free account
hub / github.com/17cupsofcoffee/rl / clear

Method clear

src/console.rs:40–49  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

38 }
39
40 pub fn clear(&mut self) {
41 self.cells = vec![
42 ConsoleCell {
43 glyph: ' ',
44 foreground: Color::rgb(1.0, 1.0, 1.0),
45 background: Color::rgb(0.0, 0.0, 0.0),
46 };
47 self.width * self.height
48 ];
49 }
50
51 pub fn set_char(&mut self, x: usize, y: usize, glyph: char) {
52 self.cells[x + y * self.width].glyph = glyph;

Callers 1

drawMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected