Function lyon_svg::path_utils::build_path [−][src]
pub fn build_path<Builder>(
builder: Builder,
src: &str
) -> Result<Builder::PathType, ParseError> where
Builder: SvgPathBuilder + Build,
Expand description
Builds path object using an SvgPathBuilder and a list of commands. Once the path is built you can tessellate it.
The SvgPathBuilder Adds to PathBuilder the rest of the SVG path commands.
Examples
// Create a simple path. let commands = &"M 0 0 L 10 0 L 10 10 L 0 10 z"; let svg_builder = Path::builder().with_svg(); let path = build_path(svg_builder, commands);