()
| 35 | |
| 36 | impl App { |
| 37 | fn new() -> (Self, Task<Message>) { |
| 38 | ( |
| 39 | Self { |
| 40 | widget: new_plot(), |
| 41 | render_strategy: PlotRenderStrategy::default(), |
| 42 | x_offset: 0.0, |
| 43 | y_offset: 0.0, |
| 44 | }, |
| 45 | iced::system::information().map(|information| { |
| 46 | Message::RenderStrategyDetected(PlotRenderStrategy::from_graphics_backend( |
| 47 | &information.graphics_backend, |
| 48 | )) |
| 49 | }), |
| 50 | ) |
| 51 | } |
| 52 | |
| 53 | fn update(&mut self, message: Message) { |
| 54 | match message { |