1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 15:13:12 -04:00

Expose PlotGeometry in public API (#4193)

Expose `egui_plot::items::values::PlotGeometry` in public API so that
`PlotItem`, which is already public, can actually be implemented by
applications. Fixes #3464.

---------

Co-authored-by: Dominique Würtz <dom@blaukraut.info>
This commit is contained in:
dwuertz
2024-03-21 12:27:18 +01:00
committed by GitHub
parent e4f209ec50
commit 0299663cdd
3 changed files with 9 additions and 3 deletions

View File

@@ -116,6 +116,11 @@ impl PlotUi {
self.last_plot_transform.value_from_position(position)
}
/// Add an arbitrary item.
pub fn add(&mut self, item: impl PlotItem + 'static) {
self.items.push(Box::new(item));
}
/// Add a data line.
pub fn line(&mut self, mut line: Line) {
if line.series.is_empty() {