gled-ui 2.30.1

gled's egui interface, shared by the desktop app and the browser
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::App;
use gled_model::asset::svg::Svg;

impl App {
    pub(crate) fn svg(&self) -> Option<&Svg> {
        self.project
            .as_ref()
            .and_then(|project| project.svg.as_ref())
    }

    pub(crate) fn svg_texture(&mut self, context: &egui::Context) -> Option<egui::TextureHandle> {
        let svg = self.project.as_ref()?.svg.as_ref()?;
        self.svg_runtime.texture(svg, context)
    }
}