pub struct Ellipse {
pub color: Color,
pub border: Option<Border>,
pub resolution: Resolution,
}
Expand description
An ellipse with filled color
Fields§
§color: Color
The ellipse color
border: Option<Border>
The ellipse border
resolution: Resolution
The resolution for the shape, 360 degrees.
Implementations§
source§impl Ellipse
impl Ellipse
sourcepub fn new_border(color: Color, radius: Radius) -> Ellipse
pub fn new_border(color: Color, radius: Radius) -> Ellipse
Creates a new ellipse border
sourcepub fn maybe_border(self, value: Option<Border>) -> Self
pub fn maybe_border(self, value: Option<Border>) -> Self
Sets optional ellipse border.
sourcepub fn resolution(self, value: Resolution) -> Self
pub fn resolution(self, value: Resolution) -> Self
Sets resolution of the ellipse smoothness.
sourcepub fn draw_from_to<P: Into<Vec2d>, G>(
&self,
from: P,
to: P,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G,
)where
G: Graphics,
pub fn draw_from_to<P: Into<Vec2d>, G>(
&self,
from: P,
to: P,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G,
)where
G: Graphics,
Draws ellipse by corners using default method.
Trait Implementations§
source§impl Colored for Ellipse
impl Colored for Ellipse
source§fn mul_rgba(
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent,
) -> Self
fn mul_rgba( self, r: ColorComponent, g: ColorComponent, b: ColorComponent, a: ColorComponent, ) -> Self
Multiplies with red, green, blue and alpha values.
source§fn hue_rad(self, angle: ColorComponent) -> Self
fn hue_rad(self, angle: ColorComponent) -> Self
Rotates hue by radians.
source§fn tint(self, f: ColorComponent) -> Self
fn tint(self, f: ColorComponent) -> Self
Mixes the current color with white. Read more
source§fn shade(self, f: ColorComponent) -> Self
fn shade(self, f: ColorComponent) -> Self
Mixes the current color with black. Read more
source§fn hue_deg(self, angle: ColorComponent) -> Self
fn hue_deg(self, angle: ColorComponent) -> Self
Rotates hue by degrees.
impl Copy for Ellipse
Auto Trait Implementations§
impl Freeze for Ellipse
impl RefUnwindSafe for Ellipse
impl Send for Ellipse
impl Sync for Ellipse
impl Unpin for Ellipse
impl UnwindSafe for Ellipse
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
)