[][src]Crate 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);
}

Re-exports

pub extern crate lyon_geom as geom;

Modules

builder

Lyon path builder

default
iterator

Tools to iterate over paths.

math

Basic types that are used everywhere. Most other lyon crates reexport them.

Structs

ArcFlags

Flag parameters for arcs as described by the SVG specification.

PathState

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

Enums

FlattenedEvent
PathEvent
QuadraticEvent
Segment
SvgEvent