2024-08-06 07:48:40 -05:00
|
|
|
pub mod paint;
|
|
|
|
pub mod texture;
|
2024-09-21 09:28:47 -05:00
|
|
|
pub mod text;
|
2024-09-28 03:49:01 -05:00
|
|
|
pub mod util;
|
2024-08-04 11:06:49 -05:00
|
|
|
|
2024-09-21 20:02:29 -05:00
|
|
|
use text::FontManager;
|
2024-08-07 08:11:07 -05:00
|
|
|
use texture::TextureAtlas;
|
|
|
|
|
2024-09-28 03:49:01 -05:00
|
|
|
/// Painter instance, stores textures and fonts needed for rendering
|
2024-08-07 08:11:07 -05:00
|
|
|
#[derive(Default)]
|
2024-09-28 03:49:01 -05:00
|
|
|
pub struct PainterInstance {
|
2024-09-21 20:02:29 -05:00
|
|
|
pub atlas: TextureAtlas,
|
|
|
|
pub fonts: FontManager,
|
2024-08-07 08:11:07 -05:00
|
|
|
}
|
|
|
|
|
2024-09-28 03:49:01 -05:00
|
|
|
impl PainterInstance {
|
2024-08-07 08:11:07 -05:00
|
|
|
pub fn new() -> Self {
|
|
|
|
Self::default()
|
|
|
|
}
|
2024-08-04 11:06:49 -05:00
|
|
|
|
2024-09-21 20:02:29 -05:00
|
|
|
// pub fn atlas(&self) -> &TextureAtlas {
|
|
|
|
// &self.atlas
|
|
|
|
// }
|
|
|
|
|
|
|
|
// pub fn atlas_mut(&mut self) -> &mut TextureAtlas {
|
|
|
|
// &mut self.atlas
|
|
|
|
// }
|
|
|
|
|
|
|
|
// pub fn fonts(&self) -> &FontManager {
|
|
|
|
// &self.fonts
|
|
|
|
// }
|
|
|
|
|
|
|
|
// pub fn fonts_mut(&mut self) -> &mut FontManager {
|
|
|
|
// &mut self.fonts
|
|
|
|
// }
|
2024-08-04 11:06:49 -05:00
|
|
|
}
|