Crate vsvg

Source
Expand description

vsvg is a library crate to manipulate vector graphics, with a focus on SVG and pen-plotter applications. It’s inspired upon vpype, the Swiss-Army-knife command-line tool for plotter vector graphics.

Modules§

exports
Export of core dependencies.

Macros§

test_file
Macro to return a test file path located in resources/fixtures.
trace_function
trace_scope

Structs§

Angle
An angle in radians, with facilities for parsing and formatting.
AngleSampler
CatmullRom
A Catmull-Rom spline.
Color
Document
DocumentMetadata
FlattenedDocument
FlattenedLayer
FlattenedPath
IndexBuilder
Layer
LayerMetadata
LayerStats
Length
A physical length, described by a value and a Unit.
LengthSampler
Path
PathIndex
PathItem
PathMetadata
Point
Polyline
A Polyline is a sequence of connected Points. It’s considered closed if the first and last points are the same.

Enums§

AngleError
LengthError
PageSize
ReindexStrategy
Unit
A distance unit.
UnitError
Errors related to Unit

Constants§

COLORS
DEFAULT_TOLERANCE
PAGE_SIZES
SMALL_UNITS
List of reasonably small units that are typically useful for drawings..
UNITS
List of all available units, useful for iteration.

Traits§

Crop
Implement cropability for a geometric type.
DocumentTrait
Draw
IntoBezPath
Can be converted into a BezPath.
IntoBezPathTolerance
Provided a tolerance, can be converted into a BezPath.
LayerTrait
PathDataTrait
PathTrait
SvgPathWriter
Transforms

Type Aliases§

LayerID