[−][src]Struct tiny_skia::Path
A Bezier path.
Can be created via PathBuilder
.
Guarantees
- Has a valid, precomputed bounds.
- All points are finite.
- Has at least two segments.
- Each contour starts with a MoveTo.
- No duplicated Move.
- No duplicated Close.
- Zero-length contours are allowed.
Implementations
impl Path
[src]
pub fn len(&self) -> usize
[src]
Returns the number of segments in the path.
pub fn is_empty(&self) -> bool
[src]
Checks if path is empty.
pub fn bounds(&self) -> Rect
[src]
Returns the bounds of the path's points.
The value is already calculated.
pub fn transform(self, ts: &Transform) -> Option<Self>
[src]
Returns a transformed in-place path.
Some points may become NaN/inf therefore this method can fail.
pub fn segments(&self) -> PathSegmentsIter<'_>ⓘNotable traits for PathSegmentsIter<'a>
impl<'a> Iterator for PathSegmentsIter<'a> type Item = PathSegment;
[src]
Notable traits for PathSegmentsIter<'a>
impl<'a> Iterator for PathSegmentsIter<'a> type Item = PathSegment;
Returns an iterator over path's segments.
pub fn clear(self) -> PathBuilder
[src]
Clears the path and returns a PathBuilder
that will reuse an allocated memory.
Trait Implementations
impl Clone for Path
[src]
impl Debug for Path
[src]
impl PartialEq<Path> for Path
[src]
impl StructuralPartialEq for Path
[src]
Auto Trait Implementations
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,