Skip to main content

SimpleShape

Trait SimpleShape 

Source
pub trait SimpleShape {
    // Required methods
    fn is_simple(&self) -> bool;
    fn simplified(&self) -> Option<IntShape>;
}
Expand description

A trait for determining if a shape, composed of multiple contours, is simple, and for obtaining a simplified version.

Required Methods§

Source

fn is_simple(&self) -> bool

Checks if the shape is simple, meaning all its contours are simple.

§Returns
  • true if all contours in the shape are simple.
  • false if any contour is complex.
Source

fn simplified(&self) -> Option<IntShape>

Returns an optional simplified version of the shape.

§Returns
  • Some(IntShape) containing the simplified shape if simplification is possible.
  • None if the shape is degenerate or empty.

Implementations on Foreign Types§

Source§

impl SimpleShape for [IntContour]

Implementors§