Struct kurbo::Arc [−][src]
pub struct Arc {
pub center: Point,
pub radii: Vec2,
pub start_angle: f64,
pub sweep_angle: f64,
pub x_rotation: f64,
}
Expand description
A single arc segment.
Fields
center: Point
The arc’s centre point.
radii: Vec2
The arc’s radii, where the vector’s x-component is the radius in the
positive x direction after applying x_rotation
.
start_angle: f64
The start angle in radians.
sweep_angle: f64
The angle between the start and end of the arc, in radians.
x_rotation: f64
How much the arc is rotated, in radians.
Implementations
Create an iterator generating Bezier path elements.
The generated elements can be appended to an existing bezier path.
Creates an Arc
from a SvgArc
.
Returns None
if arc
is actually a straight line.
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
The perimeter of the ellipse.
Note: Finding the perimeter of an ellipse is fairly involved, so for now we just approximate by using the bezier curve representation.
Note: shape isn’t closed, so a point’s winding number is not well defined.
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 Arc
impl UnwindSafe for Arc
Blanket Implementations
Mutably borrows from an owned value. Read more