We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 16714cf + 8235784 commit 5fccc95Copy full SHA for 5fccc95
plotters/src/element/basic_shapes.rs
@@ -418,6 +418,20 @@ impl<Coord> Rectangle<Coord> {
418
self.margin = (t, b, l, r);
419
self
420
}
421
+
422
+ /// Get the points of the rectangle
423
+ /// - returns the element points
424
+ pub fn get_points(&self) -> (&Coord, &Coord) {
425
+ (&self.points[0], &self.points[1])
426
+ }
427
428
+ /// Set the style of the rectangle
429
+ /// - `style`: The shape style
430
+ /// - returns a mut reference to the rectangle
431
+ pub fn set_style<S: Into<ShapeStyle>>(&mut self, style: S) -> &mut Self {
432
+ self.style = style.into();
433
+ self
434
435
436
437
impl<'a, Coord> PointCollection<'a, Coord> for &'a Rectangle<Coord> {
0 commit comments