pub struct FixShape {
pub paths: Vec<FixPath>,
}Expand description
Represents a fixed geometric shape with contour and holes.
Fields§
§paths: Vec<FixPath>Implementations§
source§impl FixShape
impl FixShape
sourcepub fn is_convex_polygon(&self) -> bool
pub fn is_convex_polygon(&self) -> bool
Is shape represent convex polygon
sourcepub fn contour(&self) -> &FixPath
pub fn contour(&self) -> &FixPath
Returns the contour defining the outer boundary of the shape.
sourcepub fn holes(&self) -> &[FixPath]
pub fn holes(&self) -> &[FixPath]
Returns the array of holes defining the inner boundaries of the shape.
sourcepub fn new_with_contour(contour: FixPath) -> Self
pub fn new_with_contour(contour: FixPath) -> Self
Initializes a new shape with the specified contour.
sourcepub fn new_with_contour_and_holes(contour: FixPath, holes: Vec<FixPath>) -> Self
pub fn new_with_contour_and_holes(contour: FixPath, holes: Vec<FixPath>) -> Self
Initializes a new shape with the specified contour and holes.
sourcepub fn new(paths: Vec<FixPath>) -> Self
pub fn new(paths: Vec<FixPath>) -> Self
Initializes a new shape with the specified paths. The first path is used as the contour, and remaining paths as holes.
sourcepub fn set_direction(&mut self, clockwise: bool)
pub fn set_direction(&mut self, clockwise: bool)
Sets the direction of the contour and holes. If the clockwise parameter is true, the contour and holes will be arranged in a clockwise direction. If false, they will be arranged in a counter-clockwise direction.
Trait Implementations§
source§impl<'de> Deserialize<'de> for FixShape
impl<'de> Deserialize<'de> for FixShape
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for FixShape
impl PartialEq for FixShape
impl Eq for FixShape
impl StructuralEq for FixShape
impl StructuralPartialEq for FixShape
Auto Trait Implementations§
impl RefUnwindSafe for FixShape
impl Send for FixShape
impl Sync for FixShape
impl Unpin for FixShape
impl UnwindSafe for FixShape
Blanket Implementations§
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