pub enum Shape {
Rect(Rect),
Polygon(Polygon),
}
Expand description
An enumeration of geometric shapes.
Variants§
Implementations§
Trait Implementations§
source§impl<T: Bbox> BoundingUnion<T> for Shape
impl<T: Bbox> BoundingUnion<T> for Shape
source§impl Contains<Point> for Shape
impl Contains<Point> for Shape
source§fn contains(&self, p: &Point) -> Containment
fn contains(&self, p: &Point) -> Containment
source§fn partially_intersects(&self, other: &T) -> bool
fn partially_intersects(&self, other: &T) -> bool
Returns true if
other
is fully or partially enclosed in this shape.source§impl HasTransformedView for Shape
impl HasTransformedView for Shape
§type TransformedView = Shape
type TransformedView = Shape
An object storing a transformed view of
Self
.source§fn transformed_view(&self, trans: Transformation) -> Self::TransformedView
fn transformed_view(&self, trans: Transformation) -> Self::TransformedView
Produces a transformed view of
self
.source§impl PartialEq for Shape
impl PartialEq for Shape
source§impl TransformMut for Shape
impl TransformMut for Shape
source§fn transform_mut(&mut self, trans: Transformation)
fn transform_mut(&mut self, trans: Transformation)
Applies matrix-vector
Transformation
trans
.source§impl TranslateMut for Shape
impl TranslateMut for Shape
source§fn translate_mut(&mut self, p: Point)
fn translate_mut(&mut self, p: Point)
Translates the shape by a
Point
through mutation.impl Eq for Shape
impl StructuralPartialEq for Shape
Auto Trait Implementations§
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnwindSafe for Shape
Blanket Implementations§
source§impl<T> AlignBbox for Twhere
T: AlignBboxMut,
impl<T> AlignBbox for Twhere
T: AlignBboxMut,
source§impl<T> AlignBboxMut for Twhere
T: AlignRectMut + Bbox,
impl<T> AlignBboxMut for Twhere
T: AlignRectMut + Bbox,
source§impl<T> AlignRect for Twhere
T: AlignRectMut,
impl<T> AlignRect for Twhere
T: AlignRectMut,
source§impl<T> AlignRectMut for Twhere
T: Translate,
impl<T> AlignRectMut for Twhere
T: Translate,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more