[−][src]Struct math2d::Ellipse
Contains the center point, x-radius, and y-radius of an ellipse.
Fields
center: Point2f
The center point of the ellipse.
radius_x: f32
The X-radius of the ellipse.
radius_y: f32
The Y-radius of the ellipse.
Methods
impl Ellipse
[src]
pub fn new(center: impl Into<Point2f>, rx: f32, ry: f32) -> Ellipse
[src]
Constructs an ellipse from its components
pub fn contains_point(&self, point: impl Into<Point2f>) -> bool
[src]
Checks if an ellipse contains a point
pub fn contains_point_transformed(
&self,
transform: &Matrix3x2f,
point: impl Into<Point2f>
) -> bool
[src]
&self,
transform: &Matrix3x2f,
point: impl Into<Point2f>
) -> bool
Determines if an ellipse which has a transform applied to it contains a specified (non- or pre-transformed) point.
Will always return false if !transform.is_invertible()
Trait Implementations
impl PartialEq<Ellipse> for Ellipse
[src]
impl Default for Ellipse
[src]
impl Clone for Ellipse
[src]
fn clone(&self) -> Ellipse
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<P> From<(P, f32, f32)> for Ellipse where
P: Into<Point2f>,
[src]
P: Into<Point2f>,
impl From<Ellipse> for D2D1_ELLIPSE
[src]
fn from(e: Ellipse) -> D2D1_ELLIPSE
[src]
impl From<D2D1_ELLIPSE> for Ellipse
[src]
fn from(e: D2D1_ELLIPSE) -> Ellipse
[src]
impl Copy for Ellipse
[src]
impl Debug for Ellipse
[src]
impl Serialize for Ellipse
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Ellipse
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,