diff --git a/crates/egui/src/painter.rs b/crates/egui/src/painter.rs index 5b8ae77df37..232450e3862 100644 --- a/crates/egui/src/painter.rs +++ b/crates/egui/src/painter.rs @@ -344,6 +344,12 @@ impl Painter { }) } + /// Paints a line connecting the points. + /// NOTE: all coordinates are screen coordinates! + pub fn line(&self, points: Vec, stroke: impl Into) -> ShapeIdx { + self.add(Shape::line(points, stroke)) + } + /// Paints a horizontal line. pub fn hline(&self, x: impl Into, y: f32, stroke: impl Into) -> ShapeIdx { self.add(Shape::hline(x, y, stroke.into()))