Struct druid::kurbo::CircleSegment
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§
§impl CircleSegment
impl CircleSegment
Trait Implementations§
§impl Add<Vec2> for CircleSegment
impl Add<Vec2> for CircleSegment
§type Output = CircleSegment
type Output = CircleSegment
The resulting type after applying the
+
operator.§fn add(self, v: Vec2) -> CircleSegment
fn add(self, v: Vec2) -> CircleSegment
Performs the
+
operation. Read more§impl Shape for CircleSegment
impl Shape for CircleSegment
§type PathElementsIter = Chain<Chain<Chain<Chain<Once<PathEl>, Once<PathEl>>, ArcAppendIter>, Once<PathEl>>, ArcAppendIter>
type PathElementsIter = Chain<Chain<Chain<Chain<Once<PathEl>, Once<PathEl>>, ArcAppendIter>, Once<PathEl>>, ArcAppendIter>
The iterator returned by the
path_elements
method.§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>
§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 Sub<Vec2> for CircleSegment
impl Sub<Vec2> for CircleSegment
§type Output = CircleSegment
type Output = CircleSegment
The resulting type after applying the
-
operator.§fn sub(self, v: Vec2) -> CircleSegment
fn sub(self, v: Vec2) -> CircleSegment
Performs the
-
operation. Read moreAuto Trait Implementations§
impl RefUnwindSafe for CircleSegment
impl Send for CircleSegment
impl Sync for CircleSegment
impl Unpin for CircleSegment
impl UnwindSafe for CircleSegment
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>
§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.