Struct kurbo::Ellipse [−][src]
pub struct Ellipse { /* fields omitted */ }
Expand description
An ellipse.
Implementations
Create A new ellipse with a given center, radii, and rotation.
The returned ellipse will be the result of taking a circle, stretching
it by the radii
along the x and y axes, then rotating it from the
x asix by rotation
radians, before finally translating the center
to center
.
Rotation is clockwise in a y-down coordinate system. For more on
rotation, see Affine::rotate
.
Returns the largest ellipse that can be bounded by this Rect
.
This uses the absolute width and height of the rectangle.
This ellipse is always axis-aligned; to apply rotation you can call
with_rotation
with the result.
Create an ellipse from an affine transformation of the unit circle.
Create a new Ellipse
centered on the provided point.
Create a new Ellipse
with the provided radii.
Create a new Ellipse
, with the rotation replaced by rotation
radians.
The rotation is clockwise, for a y-down coordinate system. For more
on rotation, See Affine::rotate
.
Returns the two radii of this ellipse.
The first number is the horizontal radius and the second is the vertical radius, before rotation.
The ellipse’s rotation, in radians.
This allows all possible ellipses to be drawn by always starting with an ellipse with the two radii on the x and y axes.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
type PathElementsIter = Chain<Once<PathEl>, ArcAppendIter>
type PathElementsIter = Chain<Once<PathEl>, ArcAppendIter>
The iterator returned by the path_elements
method. Read more
The smallest rectangle that encloses the shape.
If the shape is a rounded rectangle, make it available.
Auto Trait Implementations
impl RefUnwindSafe for Ellipse
impl UnwindSafe for Ellipse
Blanket Implementations
Mutably borrows from an owned value. Read more