[][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>

Methods

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: FnMut(Point<S>)>(
    &self,
    tolerance: S,
    call_back: &mut F
)
[src]

Approximates the arc with a sequence of line segments.

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

Finds the interval of the beginning of the curve that can be approximated with a line segment.

pub fn flattened(&self, tolerance: S) -> Flattened<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: Scalar> Segment for Arc<S>[src]

type Scalar = S

fn dx(&self, t: Self::Scalar) -> Self::Scalar[src]

Sample x derivative at t (expecting t between 0 and 1).

fn dy(&self, t: Self::Scalar) -> Self::Scalar[src]

Sample y derivative at t (expecting t between 0 and 1).

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

fn flattened(self, tolerance: Self::Scalar) -> Flattened<Self::Scalar, Self>[src]

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

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

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

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

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

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

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

Auto Trait Implementations

impl<S> Unpin for Arc<S> where
    S: Unpin

impl<S> Sync for Arc<S> where
    S: Sync

impl<S> Send for Arc<S> where
    S: Send

impl<S> UnwindSafe for Arc<S> where
    S: UnwindSafe

impl<S> RefUnwindSafe for Arc<S> where
    S: RefUnwindSafe

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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

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

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