(frame: &mut Frame, state: &PlotState)
| 359 | } |
| 360 | |
| 361 | fn draw_crosshairs(frame: &mut Frame, state: &PlotState) { |
| 362 | if !state.crosshairs_enabled { |
| 363 | return; |
| 364 | } |
| 365 | |
| 366 | let pos = state.crosshairs_position; |
| 367 | let horizontal = canvas::Path::line( |
| 368 | iced::Point::new(0.0, pos.y), |
| 369 | iced::Point::new(state.bounds.width, pos.y), |
| 370 | ); |
| 371 | let vertical = canvas::Path::line( |
| 372 | iced::Point::new(pos.x, 0.0), |
| 373 | iced::Point::new(pos.x, state.bounds.height), |
| 374 | ); |
| 375 | let stroke = canvas::Stroke::default().with_color(crosshair_color()); |
| 376 | frame.stroke(&horizontal, stroke); |
| 377 | frame.stroke(&vertical, stroke); |
| 378 | } |
| 379 | |
| 380 | #[allow(clippy::too_many_arguments)] |
| 381 | fn draw_marker( |
no test coverage detected