pub fn run(path: &mut Path, options: &Options, style_info: &StyleInfo)Expand description
Returns an optimised version of the input path
Note that depending on the options and style-info given, the optimisation may be lossy.
§Examples
If you don’t have any access to attributes or styles for a specific SVG element the path belongs to, try running this with the conservative approach
use oxvg_path::Path;
use oxvg_path::convert::{Options, StyleInfo, run};
use oxvg_path::parser::Parse as _;
let mut path = Path::parse_string("M 10,50 L 10,50").unwrap();
let options = Options::default();
let style_info = StyleInfo::conservative();
run(&mut path, &options, &style_info);
assert_eq!(&path.to_string(), "M10 50h0");