#[repr(C)]pub struct SvgPath {
pub items: SvgPathElementVec,
}Fields§
§items: SvgPathElementVecImplementations§
Source§impl SvgPath
impl SvgPath
Sourcepub const fn create(items: SvgPathElementVec) -> Self
pub const fn create(items: SvgPathElementVec) -> Self
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: Self) -> Option<()>
pub fn join_with(&mut self, path: Self) -> 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§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