[−][src]Struct lyon_geom::arc::Arc
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]
F: FnMut(&QuadraticBezierSegment<S>),
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]
F: FnMut(&CubicBezierSegment<S>),
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]
&self,
tolerance: S,
call_back: &mut F
)
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]
F: FnMut(S),
pub fn for_each_local_y_extremum_t<F>(&self, cb: &mut F) where
F: FnMut(S),
[src]
F: FnMut(S),
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 from(&self) -> Point<S>
[src]
fn to(&self) -> Point<S>
[src]
fn sample(&self, t: S) -> Point<S>
[src]
fn x(&self, t: S) -> S
[src]
fn y(&self, t: S) -> S
[src]
fn derivative(&self, t: S) -> Vector<S>
[src]
fn split_range(&self, t_range: Range<S>) -> Self
[src]
fn split(&self, t: S) -> (Self, Self)
[src]
fn before_split(&self, t: S) -> Self
[src]
fn after_split(&self, t: S) -> Self
[src]
fn flip(&self) -> Self
[src]
fn approximate_length(&self, tolerance: S) -> S
[src]
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 flattening_step(&self, tolerance: S) -> 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(&self) -> 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,
S: Unpin,
impl<S> Sync for Arc<S> where
S: Sync,
S: Sync,
impl<S> Send for Arc<S> where
S: Send,
S: Send,
impl<S> UnwindSafe for Arc<S> where
S: UnwindSafe,
S: UnwindSafe,
impl<S> RefUnwindSafe for Arc<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
Blanket Implementations
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,