pub enum VnPathVerb {
MoveTo([f32; 2]),
LineTo([f32; 2]),
QuadTo([f32; 2], [f32; 2]),
CubicTo([f32; 2], [f32; 2], [f32; 2]),
Close,
}Expand description
vue-native fork: one verb of a path(), in absolute pixels from the
reference box’s top left corner. A parser resolves the relative commands,
the H/V lines, the S/T reflections and the arcs
(VnPathVerb::push_arc) into these five.
Variants§
MoveTo([f32; 2])
M: starts a subpath.
LineTo([f32; 2])
L, H, V.
QuadTo([f32; 2], [f32; 2])
Q, T: a control point and the end.
CubicTo([f32; 2], [f32; 2], [f32; 2])
C, S, A: two control points and the end.
Close
Z: closes the subpath. A fill closes every subpath anyway.
Implementations§
Source§impl VnPathVerb
impl VnPathVerb
Sourcepub fn push_arc(
out: &mut Vec<VnPathVerb>,
from: [f32; 2],
radii: [f32; 2],
x_rotation_degrees: f32,
large_arc: bool,
sweep: bool,
to: [f32; 2],
)
pub fn push_arc( out: &mut Vec<VnPathVerb>, from: [f32; 2], radii: [f32; 2], x_rotation_degrees: f32, large_arc: bool, sweep: bool, to: [f32; 2], )
Appends SVG’s elliptical arc from from to to (SVG 2 §9.3.8 and
its appendix B.2.5: out-of-range radii scale up, a zero radius is a
line, an arc to its own start is nothing) as cubics.
Trait Implementations§
Source§impl Clone for VnPathVerb
impl Clone for VnPathVerb
impl Copy for VnPathVerb
Source§impl Debug for VnPathVerb
impl Debug for VnPathVerb
Source§impl<'de> Deserialize<'de> for VnPathVerb
impl<'de> Deserialize<'de> for VnPathVerb
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 VnPathVerb
impl PartialEq for VnPathVerb
Source§impl Serialize for VnPathVerb
impl Serialize for VnPathVerb
impl StructuralPartialEq for VnPathVerb
Auto Trait Implementations§
impl Forget for VnPathVerb
impl Freeze for VnPathVerb
impl Move for VnPathVerb
impl RefUnwindSafe for VnPathVerb
impl Send for VnPathVerb
impl Sync for VnPathVerb
impl Unpin for VnPathVerb
impl UnsafeUnpin for VnPathVerb
impl UnwindSafe for VnPathVerb
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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