Struct kurbo::Circle [−][src]
A circle.
Fields
center: Point
The center.
radius: f64
The radius.
Implementations
impl Circle
[src]
pub fn new(center: impl Into<Point>, radius: f64) -> Circle
[src]
A new circle from center and radius.
pub fn segment(
self,
inner_radius: f64,
start_angle: f64,
sweep_angle: f64
) -> CircleSegment
[src]
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
[src]
Is this circle finite?
pub fn is_nan(&self) -> bool
[src]
Is this circle NaN?
Trait Implementations
impl Add<Vec2> for Circle
[src]
type Output = Circle
The resulting type after applying the +
operator.
fn add(self, v: Vec2) -> Circle
[src]
impl Clone for Circle
[src]
impl Copy for Circle
[src]
impl Debug for Circle
[src]
impl Default for Circle
[src]
impl<'de> Deserialize<'de> for Circle
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl From<Circle> for Ellipse
[src]
impl Mul<Circle> for Affine
[src]
type Output = Ellipse
The resulting type after applying the *
operator.
fn mul(self, other: Circle) -> Self::Output
[src]
impl Mul<Circle> for TranslateScale
[src]
type Output = Circle
The resulting type after applying the *
operator.
fn mul(self, other: Circle) -> Circle
[src]
impl PartialEq<Circle> for Circle
[src]
impl Serialize for Circle
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl Shape for Circle
[src]
type PathElementsIter = CirclePathIter
The iterator returned by the path_elements
method. Read more
fn path_elements(&self, tolerance: f64) -> CirclePathIter
[src]
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 as_circle(&self) -> Option<Circle>
[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_path_slice(&self) -> Option<&[PathEl]>
[src]
impl StructuralPartialEq for Circle
[src]
impl Sub<Vec2> for Circle
[src]
Auto Trait Implementations
impl RefUnwindSafe for Circle
[src]
impl Send for Circle
[src]
impl Sync for Circle
[src]
impl Unpin for Circle
[src]
impl UnwindSafe for Circle
[src]
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,