Method
plot
(
&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 | |
| 56 | impl Render for PlottersDrawAreaViewer { |
Tested by
no test coverage detected