Skip to main content

Shaping

Trait Shaping 

Source
pub trait Shaping:
    Send
    + Sync
    + 'static {
    // Required method
    fn path(&self, path: &mut ShapePath, rect: Rect);
}
Expand description

How a shape draws itself into a rect.

Required Methods§

Source

fn path(&self, path: &mut ShapePath, rect: Rect)

Add this shape’s path for rect.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F> Shaping for F
where F: Fn(&mut ShapePath, Rect) + Send + Sync + 'static,