Struct kurbo::CircleSegment [−][src]
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]
center: impl Into<Point>,
outer_radius: f64,
inner_radius: f64,
start_angle: f64,
sweep_angle: f64
) -> Self
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.
fn add(self, v: Vec2) -> Self
[src]
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
fn path_elements(
&self,
tolerance: f64
) -> Chain<Chain<Chain<Chain<Once<PathEl>, Once<PathEl>>, ArcAppendIter>, Once<PathEl>>, ArcAppendIter>
[src]
&self,
tolerance: f64
) -> Chain<Chain<Chain<Chain<Once<PathEl>, Once<PathEl>>, ArcAppendIter>, Once<PathEl>>, ArcAppendIter>
fn area(&self) -> f64
[src]
fn perimeter(&self, _accuracy: f64) -> f64
[src]
fn winding(&self, pt: Point) -> i32
[src]
fn bounding_box(&self) -> Rect
[src]
fn to_path(&self, tolerance: f64) -> BezPath
[src]
fn into_path(self, tolerance: f64) -> BezPath
[src]
fn path_segments(&self, tolerance: f64) -> Segments<Self::PathElementsIter>ⓘ
[src]
fn contains(&self, pt: Point) -> bool
[src]
fn as_line(&self) -> Option<Line>
[src]
fn as_rect(&self) -> Option<Rect>
[src]
fn as_rounded_rect(&self) -> Option<RoundedRect>
[src]
fn as_circle(&self) -> Option<Circle>
[src]
fn as_path_slice(&self) -> Option<&[PathEl]>
[src]
impl Sub<Vec2> for CircleSegment
[src]
type Output = CircleSegment
The resulting type after applying the -
operator.
fn sub(self, v: Vec2) -> Self
[src]
Auto Trait Implementations
impl RefUnwindSafe for CircleSegment
impl Send for CircleSegment
impl Sync for CircleSegment
impl Unpin for CircleSegment
impl UnwindSafe for CircleSegment
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,
pub 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, 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.
pub 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>,