Struct piet_common::kurbo::Circle [−]
A circle.
Fields
center: Point
The center.
radius: f64
The radius.
Implementations
impl Circle
pub fn new(center: impl Into<Point>, radius: f64) -> Circle
A new circle from center and radius.
pub fn segment(
self,
inner_radius: f64,
start_angle: f64,
sweep_angle: f64
) -> CircleSegment
self,
inner_radius: f64,
start_angle: f64,
sweep_angle: f64
) -> CircleSegment
Create a CircleSegment
by cutting out parts of this circle.
pub fn is_finite(&self) -> bool
Is this circle finite?
pub fn is_nan(&self) -> bool
Is this circle NaN?
Trait Implementations
impl Add<Vec2> for Circle
type Output = Circle
The resulting type after applying the +
operator.
pub fn add(self, v: Vec2) -> Circle
impl Clone for Circle
pub fn clone(&self) -> Circle
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Circle
impl Debug for Circle
impl Default for Circle
impl From<Circle> for Ellipse
impl Mul<Circle> for Affine
type Output = Ellipse
The resulting type after applying the *
operator.
pub fn mul(self, other: Circle) -> <Affine as Mul<Circle>>::Output
impl Mul<Circle> for TranslateScale
type Output = Circle
The resulting type after applying the *
operator.
pub fn mul(self, other: Circle) -> Circle
impl PartialEq<Circle> for Circle
impl Shape for Circle
type PathElementsIter = CirclePathIter
The iterator returned by the path_elements
method. Read more
pub fn path_elements(&self, tolerance: f64) -> CirclePathIter
pub fn area(&self) -> f64
pub fn perimeter(&self, _accuracy: f64) -> f64
pub fn winding(&self, pt: Point) -> i32
pub fn bounding_box(&self) -> Rect
pub fn as_circle(&self) -> Option<Circle>
pub fn to_path(&self, tolerance: f64) -> BezPath
pub fn into_path(self, tolerance: f64) -> BezPath
pub fn path_segments(&self, tolerance: f64) -> Segments<Self::PathElementsIter>ⓘ
pub fn contains(&self, pt: Point) -> bool
pub fn as_line(&self) -> Option<Line>
pub fn as_rect(&self) -> Option<Rect>
pub fn as_rounded_rect(&self) -> Option<RoundedRect>
pub fn as_path_slice(&self) -> Option<&[PathEl]>
impl StructuralPartialEq for Circle
impl Sub<Vec2> for Circle
Auto Trait Implementations
impl RefUnwindSafe for Circle
impl Send for Circle
impl Sync for Circle
impl Unpin for Circle
impl UnwindSafe for Circle
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> RoundFrom<T> for T
[src]
pub fn round_from(x: T) -> T
[src]
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
[src]
U: RoundFrom<T>,
pub fn round_into(self) -> U
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,