vsvg 0.5.0

Core library for pen-plotter graphics.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[derive(Debug, Clone, Default, PartialEq)]
pub struct LayerMetadata {
    pub name: Option<String>,
    //TODO(#4): add default path metadata
}

impl LayerMetadata {
    /// Merge with another [`LayerMetadata`].
    ///
    /// Only the common attributes are kept, the other are discarded.
    pub fn merge(&mut self, other: &Self) {
        if self.name != other.name {
            self.name = None;
        }
    }
}