[][src]Module lyon_algorithms::hatching

Generate hatching and dotted patterns in a path.

Example

This example is not tested
// Generate a path representing a hatching of the original path.
let mut path_builder = Path::builder();
let mut hatcher = Hatcher::new();
hatcher.hatch_path(
    original_path.path_iter(),
    &options,
    &mut RegularHatchingPattern {
        interval: hatch.spacing,
        callback: &mut|segment: &HatchSegment| {
            path_builder.move_to(segment.a.position);
            path_builder.line_to(segment.b.position);
        }
    },
);
let hatched_path = path_builder.build();

Structs

Dot
DotOptions

Parameters for generating dot patterns.

HatchEndpoint
HatchSegment
Hatcher

A context object that can fill a path with a hatching or dot pattern.

HatchingOptions

Parameters for the hatcher.

RegularDotPattern

A DotBuilder implementation for dot patterns with constant intervals.

RegularHatchingPattern

A HatchBuilder implementation for hatching patterns with constant intervals.

Traits

DotBuilder

The output of Hatcher::dot_path.

HatchBuilder

The output of Hatcher::hatch_path.