Struct kurbo::CircleSegment
source · pub struct CircleSegment {
pub center: Point,
pub outer_radius: f64,
pub inner_radius: f64,
pub start_angle: f64,
pub sweep_angle: f64,
}
Expand description
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§
Trait Implementations§
source§impl Add<Vec2> for CircleSegment
impl Add<Vec2> for CircleSegment
source§impl Shape for CircleSegment
impl Shape for CircleSegment
§type PathElementsIter<'iter> = Chain<Chain<Chain<Chain<Once<PathEl>, Once<PathEl>>, ArcAppendIter>, Once<PathEl>>, ArcAppendIter>
type PathElementsIter<'iter> = Chain<Chain<Chain<Chain<Once<PathEl>, Once<PathEl>>, ArcAppendIter>, Once<PathEl>>, ArcAppendIter>
The iterator returned by the
path_elements
method.source§fn path_elements(
&self,
tolerance: f64
) -> Chain<Chain<Chain<Chain<Once<PathEl>, Once<PathEl>>, ArcAppendIter>, Once<PathEl>>, ArcAppendIter>
fn path_elements( &self, tolerance: f64 ) -> Chain<Chain<Chain<Chain<Once<PathEl>, Once<PathEl>>, ArcAppendIter>, Once<PathEl>>, ArcAppendIter>
source§fn bounding_box(&self) -> Rect
fn bounding_box(&self) -> Rect
The smallest rectangle that encloses the shape.
source§fn path_segments(&self, tolerance: f64) -> Segments<Self::PathElementsIter<'_>> ⓘ
fn path_segments(&self, tolerance: f64) -> Segments<Self::PathElementsIter<'_>> ⓘ
source§fn as_rounded_rect(&self) -> Option<RoundedRect>
fn as_rounded_rect(&self) -> Option<RoundedRect>
If the shape is a rounded rectangle, make it available.