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§
Sourcefn is_simple(&self) -> bool
fn is_simple(&self) -> bool
Checks if the shape is simple, meaning all its contours are simple.
§Returns
trueif all contours in the shape are simple.falseif any contour is complex.
Sourcefn simplified(&self) -> Option<IntShape>
fn simplified(&self) -> Option<IntShape>
Returns an optional simplified version of the shape.
§Returns
Some(IntShape)containing the simplified shape if simplification is possible.Noneif the shape is degenerate or empty.