Struct kurbo::CircleSegment[][src]

pub struct CircleSegment {
    pub center: Point,
    pub outer_radius: f64,
    pub inner_radius: f64,
    pub start_angle: f64,
    pub sweep_angle: f64,
}

A segment of a circle.

If inner_radius > 0, then the shape will be a doughnut segment.

Fields

center: Point

The center.

outer_radius: f64

The outer radius.

inner_radius: f64

The inner radius.

start_angle: f64

The angle to start drawing the segment (in radians).

sweep_angle: f64

The arc length of the segment (in radians).

Implementations

impl CircleSegment[src]

pub fn new(
    center: impl Into<Point>,
    outer_radius: f64,
    inner_radius: f64,
    start_angle: f64,
    sweep_angle: f64
) -> Self
[src]

Create a CircleSegment out of its constituent parts.

pub fn is_finite(&self) -> bool[src]

Is this circle segment finite?

pub fn is_nan(&self) -> bool[src]

Is this circle segment NaN?

Trait Implementations

impl Add<Vec2> for CircleSegment[src]

type Output = CircleSegment

The resulting type after applying the + operator.

impl Shape for CircleSegment[src]

type PathElementsIter = Chain<Chain<Chain<Chain<Once<PathEl>, Once<PathEl>>, ArcAppendIter>, Once<PathEl>>, ArcAppendIter>

The iterator returned by the path_elements method. Read more

impl Sub<Vec2> for CircleSegment[src]

type Output = CircleSegment

The resulting type after applying the - operator.

Auto Trait Implementations

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, 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.