MCPcopy Create free account
hub / github.com/JakkuSakura/plotters-gpui / plot

Method plot

src/element.rs:38–53  ·  view source on GitHub ↗
(
        &self,
        bounds: Bounds<Pixels>,
        window: &mut Window,
        cx: &mut App,
    )

Source from the content-addressed store, hash-verified

36 }
37
38 pub fn plot(
39 &self,
40 bounds: Bounds<Pixels>,
41 window: &mut Window,
42 cx: &mut App,
43 ) -> Result<(), DrawingAreaErrorKind<crate::Error>> {
44 let mut model = self.model.write();
45 let root = GpuiBackend::new(bounds, window, cx).into_drawing_area();
46 root.fill(&model.backend_color)?;
47 model
48 .chart
49 .plot(&root)
50 .map_err(DrawingAreaErrorKind::BackendError)?;
51 root.present()?;
52 Ok(())
53 }
54}
55
56impl Render for PlottersDrawAreaViewer {

Callers 1

renderMethod · 0.45

Calls 1

presentMethod · 0.80

Tested by

no test coverage detected