[−][src]Struct beziercurve_wkt::BezierCurve
Fields
items: Vec<BezierCurveItem>
Methods
impl BezierCurve
[src]
pub fn from_str(s: &str) -> Result<Self, ParseErrorWithContext>
[src]
Parses a BezierCurve
from a str
let s = "BEZIERCURVE((0.0 1.0, 2.0 1.0), (2.0 1.0, 3.0 4.0, 0.0 0.0), (0.0 0.0, 0.0 1.0))"; let parsed_curve = BezierCurve::from_str(s).unwrap(); assert_eq!(parsed_curve, BezierCurve { items: vec![ BezierCurveItem::Line((Point { x: 0.0, y: 1.0 }, Point { x: 2.0, y: 1.0 })), BezierCurveItem::QuadraticCurve((Point { x: 2.0, y: 1.0 }, Point { x: 3.0, y: 4.0 }, Point { x: 0.0, y: 0.0 })), BezierCurveItem::Line((Point { x: 0.0, y: 0.0 }, Point { x: 0.0, y: 1.0 })), ]}); assert!(parsed_curve.is_closed());
pub fn get_bbox(&self) -> Bbox
[src]
pub fn is_closed(&self) -> bool
[src]
Returns whether the bezier curve is closed
pub fn cache(self) -> BezierCurveCache
[src]
Builds a quadtree-based cache from the current bezier curve
pub fn get_commands(&self) -> Vec<BezierCommand>
[src]
Turn the line into a SVG-esque sequence of "moveto x y, lineto x y"
Trait Implementations
impl Clone for BezierCurve
[src]
fn clone(&self) -> BezierCurve
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for BezierCurve
[src]
impl Display for BezierCurve
[src]
impl Index<CurveIndex> for BezierCurve
[src]
type Output = BezierCurveItem
The returned type after indexing.
fn index(&self, i: CurveIndex) -> &BezierCurveItem
[src]
impl IndexMut<CurveIndex> for BezierCurve
[src]
fn index_mut(&mut self, i: CurveIndex) -> &mut BezierCurveItem
[src]
impl PartialEq<BezierCurve> for BezierCurve
[src]
fn eq(&self, other: &BezierCurve) -> bool
[src]
fn ne(&self, other: &BezierCurve) -> bool
[src]
impl PartialOrd<BezierCurve> for BezierCurve
[src]
fn partial_cmp(&self, other: &BezierCurve) -> Option<Ordering>
[src]
fn lt(&self, other: &BezierCurve) -> bool
[src]
fn le(&self, other: &BezierCurve) -> bool
[src]
fn gt(&self, other: &BezierCurve) -> bool
[src]
fn ge(&self, other: &BezierCurve) -> bool
[src]
impl StructuralPartialEq for BezierCurve
[src]
Auto Trait Implementations
impl RefUnwindSafe for BezierCurve
impl Send for BezierCurve
impl Sync for BezierCurve
impl Unpin for BezierCurve
impl UnwindSafe for BezierCurve
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,
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.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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>,