pub struct Circle {
pub center: Point,
pub radius: f32,
}
Fields§
§center: Point
§radius: f32
Trait Implementations§
Source§impl Implicit for Circle
impl Implicit for Circle
Source§fn sample(&self, pos: Point) -> f32
fn sample(&self, pos: Point) -> f32
Returns the distance from a point to the nearest edge of a surface. Read more
Source§fn bounding_box(&self) -> Option<Rect>
fn bounding_box(&self) -> Option<Rect>
Returns a bounding box that surrounds a shape (if one exists). Read more
Source§fn follows_rules(&self) -> bool
fn follows_rules(&self) -> bool
True if the shape follows all the rules about implicit shapes.
fn boxed(self) -> SyncBox
fn and<B: Implicit>(self, other: B) -> And<Self, B>where
Self: Sized,
fn and_not<B: Implicit>(self, other: B) -> And<Self, Not<B>>where
Self: Sized,
fn or<B: Implicit>(self, other: B) -> Or<Self, B>where
Self: Sized,
fn xor<B: Implicit>(self, other: B) -> Xor<Self, B>where
Self: Sized,
fn shrink(self, by: f32) -> Boundary<Self>where
Self: Sized,
fn grow(self, by: f32) -> Boundary<Self>where
Self: Sized,
fn cache_bounding_box(self) -> BoxCache<Self>where
Self: Sized,
fn transform(self) -> Transformation<Self>where
Self: Sized,
fn scale(self, sx: f32, sy: f32) -> Transformation<Self>where
Self: Sized,
fn translate(self, x: f32, y: f32) -> Transformation<Self>where
Self: Sized,
fn rotate(self, rads: f32) -> Transformation<Self>where
Self: Sized,
fn not(self) -> Not<Self>where
Self: Sized,
fn outline_inner(self, distance: f32) -> And<Self, Not<Boundary<Self>>>
fn outline_outer(self, distance: f32) -> And<Boundary<Self>, Not<Self>>
fn borrow<'a>(&'a self) -> &'a dyn Implicitwhere
Self: Sized,
fn fix_rules(self, resolution: f32) -> PolyGroup
fn smooth(self, amount: f32, resolution: f32) -> Boundary<PolyGroup>
fn center(&self) -> Option<Point>
fn center_at(self, point: &Point) -> Transformation<Self>where
Self: Sized,
impl Copy for Circle
Auto Trait Implementations§
impl Freeze for Circle
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more