MCPcopy Index your code
hub / github.com/endbasic/endbasic / draw_logo

Function draw_logo

repl/src/logo.rs:116–125  ·  view source on GitHub ↗

Draws the EndBASIC logo fitted within the rectangle bounded by `x1y1` and `x2y2`. When `x2y2` is not specified, the logo is drawn at its intrinsic size.

(
    console: &mut dyn Console,
    x1y1: PixelsXY,
    x2y2: Option<PixelsXY>,
)

Source from the content-addressed store, hash-verified

114///
115/// When `x2y2` is not specified, the logo is drawn at its intrinsic size.
116pub(crate) fn draw_logo(
117 console: &mut dyn Console,
118 x1y1: PixelsXY,
119 x2y2: Option<PixelsXY>,
120) -> io::Result<()> {
121 let (old_fg, old_bg) = console.color();
122 let result = draw_logo_internal(console, x1y1, x2y2);
123 console.set_color(old_fg, old_bg)?;
124 result
125}
126
127#[cfg(test)]
128mod tests {

Calls 3

draw_logo_internalFunction · 0.85
colorMethod · 0.45
set_colorMethod · 0.45