[][src]Struct lyon_geom::Arc

pub struct Arc<S> {
    pub center: Point<S>,
    pub radii: Vector<S>,
    pub start_angle: Angle<S>,
    pub sweep_angle: Angle<S>,
    pub x_rotation: Angle<S>,
}

An elliptic arc curve segment.

Fields

center: Point<S>radii: Vector<S>start_angle: Angle<S>sweep_angle: Angle<S>x_rotation: Angle<S>

Implementations

impl<S: Scalar> Arc<S>[src]

pub fn circle(center: Point<S>, radius: S) -> Self[src]

Create simple circle.

pub fn from_svg_arc(arc: &SvgArc<S>) -> Arc<S>[src]

Convert from the SVG arc notation.

pub fn to_svg_arc(&self) -> SvgArc<S>[src]

Convert to the SVG arc notation.

pub fn for_each_quadratic_bezier<F>(&self, cb: &mut F) where
    F: FnMut(&QuadraticBezierSegment<S>), 
[src]

Approximate the arc with a sequence of quadratic bézier curves.

pub fn for_each_cubic_bezier<F>(&self, cb: &mut F) where
    F: FnMut(&CubicBezierSegment<S>), 
[src]

Approximate the arc with a sequence of cubic bézier curves.

pub fn sample(&self, t: S) -> Point<S>[src]

Sample the curve at t (expecting t between 0 and 1).

pub fn x(&self, t: S) -> S[src]

pub fn y(&self, t: S) -> S[src]

pub fn sample_tangent(&self, t: S) -> Vector<S>[src]

Sample the curve's tangent at t (expecting t between 0 and 1).

pub fn get_angle(&self, t: S) -> Angle<S>[src]

Sample the curve's angle at t (expecting t between 0 and 1).

pub fn end_angle(&self) -> Angle<S>[src]

pub fn from(&self) -> Point<S>[src]

pub fn to(&self) -> Point<S>[src]

pub fn split_range(&self, t_range: Range<S>) -> Self[src]

Return the sub-curve inside a given range of t.

This is equivalent splitting at the range's end points.

pub fn split(&self, t: S) -> (Arc<S>, Arc<S>)[src]

Split this curve into two sub-curves.

pub fn before_split(&self, t: S) -> Arc<S>[src]

Return the curve before the split point.

pub fn after_split(&self, t: S) -> Arc<S>[src]

Return the curve after the split point.

pub fn flip(&self) -> Self[src]

Swap the direction of the segment.

pub fn for_each_flattened<F>(&self, tolerance: S, callback: &mut F) where
    F: FnMut(Point<S>), 
[src]

Approximates the arc with a sequence of line segments.

pub fn for_each_flattened_with_t<F>(&self, tolerance: S, callback: &mut F) where
    F: FnMut(Point<S>, S), 
[src]

Iterates through the curve invoking a callback at each point.

pub fn flattened(&self, tolerance: S) -> Flattened<S>

Notable traits for Flattened<S>

impl<S: Scalar> Iterator for Flattened<S> type Item = Point<S>;
[src]

Returns the flattened representation of the curve as an iterator, starting after the current point.

pub fn fast_bounding_rect(&self) -> Rect<S>[src]

Returns a conservative rectangle that contains the curve.

pub fn bounding_rect(&self) -> Rect<S>[src]

Returns a conservative rectangle that contains the curve.

pub fn for_each_local_x_extremum_t<F>(&self, cb: &mut F) where
    F: FnMut(S), 
[src]

pub fn for_each_local_y_extremum_t<F>(&self, cb: &mut F) where
    F: FnMut(S), 
[src]

pub fn bounding_range_x(&self) -> (S, S)[src]

pub fn bounding_range_y(&self) -> (S, S)[src]

pub fn fast_bounding_range_x(&self) -> (S, S)[src]

pub fn fast_bounding_range_y(&self) -> (S, S)[src]

pub fn approximate_length(&self, tolerance: S) -> S[src]

Trait Implementations

impl<S: Clone> Clone for Arc<S>[src]

impl<S: Copy> Copy for Arc<S>[src]

impl<S: Debug> Debug for Arc<S>[src]

impl<S: Scalar> Into<Arc<S>> for SvgArc<S>[src]

impl<S: PartialEq> PartialEq<Arc<S>> for Arc<S>[src]

impl<S: Scalar> Segment for Arc<S>[src]

type Scalar = S

impl<S> StructuralPartialEq for Arc<S>[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for Arc<S> where
    S: RefUnwindSafe
[src]

impl<S> Send for Arc<S> where
    S: Send
[src]

impl<S> Sync for Arc<S> where
    S: Sync
[src]

impl<S> Unpin for Arc<S> where
    S: Unpin
[src]

impl<S> UnwindSafe for Arc<S> where
    S: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.