Create a new [`Fill`] between two shapes.
(begin: ShapeId, end: ShapeId)
| 21 | impl Fill { |
| 22 | /// Create a new [`Fill`] between two shapes. |
| 23 | pub fn new(begin: ShapeId, end: ShapeId) -> Self { |
| 24 | Self { |
| 25 | id: ShapeId::new(), |
| 26 | begin, |
| 27 | end, |
| 28 | label: None, |
| 29 | color: Color::from_rgba(0.2, 0.6, 1.0, 0.25), |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | /// Set a label for this fill (shown in legend when non-empty). |
| 34 | pub fn with_label(mut self, label: impl Into<String>) -> Self { |