Module lyon::path[]

Data structures and traits to work with paths (vector graphics).

To build and consume paths, see the builder and iterator modules.

Examples

use lyon_path::default::Path;
use lyon_path::math::{point};
use lyon_path::builder::*;

// Create a builder object to build the path.
let mut builder = Path::builder();

// Build a simple path.
let mut builder = Path::builder();
builder.move_to(point(0.0, 0.0));
builder.line_to(point(1.0, 2.0));
builder.line_to(point(2.0, 0.0));
builder.line_to(point(1.0, 1.0));
builder.close();

// Generate the actual path object.
let path = builder.build();

for event in &path {
    println!("{:?}", event);
}

Modules

builder

Lyon path builder

default
geom

Simple 2D geometric primitives on top of euclid.

iterator

Tools to iterate over paths.

Structs

PathState

Represents the current state of a path while it is being built.

Enums

FlattenedEvent
PathEvent
QuadraticEvent
Segment
SvgEvent