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>,
)
| 114 | /// |
| 115 | /// When `x2y2` is not specified, the logo is drawn at its intrinsic size. |
| 116 | pub(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)] |
| 128 | mod tests { |