pub trait Inset: Primitive2d {
// Required method
fn inset(self, distance: f32) -> Self;
}Expand description
Required Methods§
Sourcefn inset(self, distance: f32) -> Self
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.