pub struct Path<T, U> {
pub color: String,
pub commands: Vec<LineCommand<T, U>>,
}
Expand description
A series of line commands that describe a path.
Fields§
§color: String
This path’s color.
commands: Vec<LineCommand<T, U>>
This path’s line commands.
Implementations§
Source§impl<T, U> Path<T, U>
impl<T, U> Path<T, U>
Sourcepub fn with_commands<I>(commands: I) -> Path<T, U>where
I: IntoIterator<Item = LineCommand<T, U>>,
pub fn with_commands<I>(commands: I) -> Path<T, U>where
I: IntoIterator<Item = LineCommand<T, U>>,
Construct a new path with the given line commands.
Source§impl<T, U> Path<T, U>
impl<T, U> Path<T, U>
Sourcepub fn transform<V>(&self, transformation: &Transform2D<T, U, V>) -> Path<T, V>
pub fn transform<V>(&self, transformation: &Transform2D<T, U, V>) -> Path<T, V>
Transform this path with the given linear transformation and return the new, transformed path.
Sourcepub fn transform_in_place(&mut self, transformation: &Transform2D<T, U, U>)
pub fn transform_in_place(&mut self, transformation: &Transform2D<T, U, U>)
Transform this path in place with the given linear transformation.
Trait Implementations§
Auto Trait Implementations§
impl<T, U> Freeze for Path<T, U>
impl<T, U> RefUnwindSafe for Path<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Path<T, U>
impl<T, U> Sync for Path<T, U>
impl<T, U> Unpin for Path<T, U>
impl<T, U> UnwindSafe for Path<T, U>where
T: UnwindSafe,
U: UnwindSafe,
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