Crate svg2polylines [] [src]

Convert an SVG file to a list of polylines (aka polygonal chains or polygonal paths).

This can be used e.g. for simple drawing robot that just support drawing straight lines and liftoff / drop pen commands.

Flattening of Bézier curves is done using the Lyon library.

Note: Currently the path style is completely ignored. Only the path itself is returned.

Minimal supported Rust version: 1.16.

FFI bindings for this crate can be found on Github.

You can optionally get serde 1 support by enabling the use_serde feature.

Structs

CoordinatePair

A CoordinatePair consists of an x and y coordinate.

Functions

parse

Parse an SVG string into a vector of polylines.

Type Definitions

Polyline

A polyline is a vector of CoordinatePair instances.