pub struct Circle {
pub center: Point,
pub radius: f64,
}
Expand description
A circle.
Fields§
§center: Point
The center.
radius: f64
The radius.
Implementations§
§impl Circle
impl Circle
pub fn segment(
self,
inner_radius: f64,
start_angle: f64,
sweep_angle: f64
) -> CircleSegment
pub fn segment( self, inner_radius: f64, start_angle: f64, sweep_angle: f64 ) -> CircleSegment
Create a CircleSegment
by cutting out parts of this circle.
Trait Implementations§
§impl Mul<Circle> for TranslateScale
impl Mul<Circle> for TranslateScale
§impl Shape for Circle
impl Shape for Circle
§type PathElementsIter = CirclePathIter
type PathElementsIter = CirclePathIter
The iterator returned by the
path_elements
method.§fn path_elements(&self, tolerance: f64) -> CirclePathIter
fn path_elements(&self, tolerance: f64) -> CirclePathIter
§fn bounding_box(&self) -> Rect
fn bounding_box(&self) -> Rect
The smallest rectangle that encloses the shape.
§fn path_segments(&self, tolerance: f64) -> Segments<Self::PathElementsIter<'_>> ⓘ
fn path_segments(&self, tolerance: f64) -> Segments<Self::PathElementsIter<'_>> ⓘ
§fn as_rounded_rect(&self) -> Option<RoundedRect>
fn as_rounded_rect(&self) -> Option<RoundedRect>
If the shape is a rounded rectangle, make it available.
§fn as_path_slice(&self) -> Option<&[PathEl]>
fn as_path_slice(&self) -> Option<&[PathEl]>
If the shape is stored as a slice of path elements, make
that available. Read more
impl Copy for Circle
impl StructuralPartialEq 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§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
impl<T> IsDefault for Twhere T: Default + PartialEq<T> + Copy,
source§fn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.