Struct piet_common::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: PointThe center.
outer_radius: f64The outer radius.
inner_radius: f64The inner radius.
start_angle: f64The angle to start drawing the segment (in radians).
sweep_angle: f64The 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 moreimpl 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. Read morefn 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 winding(&self, pt: Point) -> i32
fn winding(&self, pt: Point) -> i32
The winding number of a point. Read more
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
sourcefn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
sourceimpl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
sourcefn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.