#[repr(C)]pub struct SvgPath {
pub items: SvgPathElementVec,
}Fields§
§items: SvgPathElementVecImplementations§
Source§impl SvgPath
impl SvgPath
Sourcepub const fn create(items: SvgPathElementVec) -> SvgPath
pub const fn create(items: SvgPathElementVec) -> SvgPath
Creates a new SvgPath from a vector of path elements
Sourcepub fn get_start(&self) -> Option<SvgPoint>
pub fn get_start(&self) -> Option<SvgPoint>
Returns the start point of the first element, or None if the path is empty.
Sourcepub fn get_end(&self) -> Option<SvgPoint>
pub fn get_end(&self) -> Option<SvgPoint>
Returns the end point of the last element, or None if the path is empty.
Sourcepub fn close(&mut self)
pub fn close(&mut self)
Closes the path by appending a line from the last point to the first point, if needed.
Sourcepub fn is_closed(&self) -> bool
pub fn is_closed(&self) -> bool
Returns true if the path’s first start point equals its last end point.
Sourcepub fn join_with(&mut self, path: SvgPath) -> Option<()>
pub fn join_with(&mut self, path: SvgPath) -> Option<()>
Joins another path onto the end of this one, interpolating the join point.
Sourcepub fn get_bounds(&self) -> SvgRect
pub fn get_bounds(&self) -> SvgRect
Returns the axis-aligned bounding rectangle of the entire path.
Trait Implementations§
Source§impl FromIterator<SvgPath> for SvgPathVec
impl FromIterator<SvgPath> for SvgPathVec
Source§fn from_iter<T>(iter: T) -> SvgPathVecwhere
T: IntoIterator<Item = SvgPath>,
fn from_iter<T>(iter: T) -> SvgPathVecwhere
T: IntoIterator<Item = SvgPath>,
Creates a value from an iterator. Read more
Source§impl PartialOrd for SvgPath
impl PartialOrd for SvgPath
impl StructuralPartialEq for SvgPath
Auto Trait Implementations§
impl Freeze for SvgPath
impl RefUnwindSafe for SvgPath
impl Send for SvgPath
impl Sync for SvgPath
impl Unpin for SvgPath
impl UnsafeUnpin for SvgPath
impl UnwindSafe for SvgPath
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more