Trait vsvg::LayerTrait
source · pub trait LayerTrait<P: PathTrait<D>, D: PathDataTrait>: Default + Transforms {
Show 14 methods
// Required methods
fn from_paths_and_metadata(paths: Vec<P>, metadata: LayerMetadata) -> Self;
fn paths(&self) -> &[P];
fn paths_mut(&mut self) -> &mut Vec<P>;
fn metadata(&self) -> &LayerMetadata;
fn metadata_mut(&mut self) -> &mut LayerMetadata;
// Provided methods
fn new() -> Self { ... }
fn for_each<F>(&mut self, f: F)
where F: Fn(&mut P) { ... }
fn bounds(&self) -> Option<Rect> { ... }
fn push_path(&mut self, path: impl Into<P>) { ... }
fn merge(&mut self, other: &Self) { ... }
fn sort(&mut self, flip: bool) { ... }
fn sort_with_builder(&mut self, builder: IndexBuilder) { ... }
fn pen_up_trajectories(&self) -> Vec<(Point, Point)> { ... }
fn stats(&self) -> LayerStats { ... }
}
Required Methods§
fn from_paths_and_metadata(paths: Vec<P>, metadata: LayerMetadata) -> Self
fn paths(&self) -> &[P]
fn paths_mut(&mut self) -> &mut Vec<P>
fn metadata(&self) -> &LayerMetadata
fn metadata_mut(&mut self) -> &mut LayerMetadata
Provided Methods§
fn new() -> Self
fn for_each<F>(&mut self, f: F)
fn bounds(&self) -> Option<Rect>
fn push_path(&mut self, path: impl Into<P>)
sourcefn merge(&mut self, other: &Self)
fn merge(&mut self, other: &Self)
Merge another layer into this one.
Also merges the metadata, see LayerMetadata::merge
.
fn sort(&mut self, flip: bool)
fn sort_with_builder(&mut self, builder: IndexBuilder)
fn pen_up_trajectories(&self) -> Vec<(Point, Point)>
fn stats(&self) -> LayerStats
Object Safety§
This trait is not object safe.