Inset

Trait Inset 

Source
pub trait Inset: Primitive2d {
    // Required method
    fn inset(self, distance: f32) -> Self;
}
Expand description

A primitive that can be resized uniformly.

See documentation on Inset::inset.

See also ToRing.

Required Methods§

Source

fn inset(self, distance: f32) -> Self

Create a new version of this primitive that is resized uniformly. That is, it resizes the shape inwards such that for the lines between vertices, it creates new parallel lines that are distance inwards from the original lines.

This is useful for creating smaller shapes or making outlines of distance thickness with Ring.

See also ToRing::to_ring

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§