(&self, ui: &Ui, plot_rect: Rect)
| 924 | } |
| 925 | |
| 926 | fn paint_background(&self, ui: &Ui, plot_rect: Rect) { |
| 927 | if self.show_background { |
| 928 | ui.painter().with_clip_rect(plot_rect).add(epaint::RectShape::new( |
| 929 | plot_rect, |
| 930 | 2, |
| 931 | ui.visuals().extreme_bg_color, |
| 932 | ui.visuals().widgets.noninteractive.bg_stroke, |
| 933 | egui::StrokeKind::Inside, |
| 934 | )); |
| 935 | } |
| 936 | } |
| 937 | |
| 938 | /// Process legend items, create legend widget, and determine show flags. |
| 939 | /// Returns `(legend_widget, show_x, show_y)`. |