oxedyne/fe2o3/fe2o3_tui/src/lib_tui/cfg/canvas.rs
541 bytes, 5 runs
created by r1870400018:1149, which is this file's identity for as long as the history lasts, whatever it is later renamed to
download · who wrote it · its history
| 1 | use crate::lib_tui::{ |
| 2 | cfg::style::StyleLibrary, |
| 3 | draw::canvas::CanvasConfig, |
| 4 | style::{ |
| 5 | Colour, |
| 6 | Style, |
| 7 | }, |
| 8 | }; |
| 9 | |
| 10 | use oxedyne_fe2o3_core::prelude::*; |
| 11 | |
| 12 | |
| 13 | #[derive(Clone, Debug, Default)] |
| 14 | pub struct CanvasLibrary; |
| 15 | |
| 16 | impl CanvasLibrary {} |
| 17 | |
| 18 | impl StyleLibrary { |
| 19 | |
| 20 | pub fn canvas_colour( |
| 21 | &self, |
| 22 | fore: Option<Colour>, |
| 23 | back: Option<Colour>, |
| 24 | ) |
| 25 | -> CanvasConfig |
| 26 | { |
| 27 | CanvasConfig { |
| 28 | style: Style::new(fore, back, None), |
| 29 | ..Default::default() |
| 30 | } |
| 31 | } |
| 32 | } |