Struct rsvg::path_builder::EllipticalArc
source · pub struct EllipticalArc {
pub r: (f64, f64),
pub x_axis_rotation: f64,
pub large_arc: LargeArc,
pub sweep: Sweep,
pub from: (f64, f64),
pub to: (f64, f64),
}
Expand description
“a” command for paths; describes an elliptical arc in terms of its endpoints.
Fields§
§r: (f64, f64)
The (x-axis, y-axis) radii for the ellipse.
x_axis_rotation: f64
The rotation angle in degrees for the ellipse’s x-axis relative to the x-axis of the user coordinate system.
large_arc: LargeArc
Flag indicating whether the arc sweep should be greater than or equal to 180 degrees, or smaller than 180 degrees.
sweep: Sweep
Flag indicating the angular direction in which the arc is drawn.
from: (f64, f64)
The (x, y) coordinates for the start point of this path segment.
to: (f64, f64)
The (x, y) coordinates for the end point of this path segment.
Implementations§
source§impl EllipticalArc
impl EllipticalArc
source§impl EllipticalArc
impl EllipticalArc
sourcepub(crate) fn center_parameterization(&self) -> ArcParameterization
pub(crate) fn center_parameterization(&self) -> ArcParameterization
Calculates a center parameterization from the endpoint parameterization.
Radii may be adjusted if there is no solution.
See section B.2.4. Conversion from endpoint to center parameterization
sourcefn from_coords(
large_arc: LargeArc,
sweep: Sweep,
coords: &mut Iter<'_, f64>
) -> EllipticalArc
fn from_coords( large_arc: LargeArc, sweep: Sweep, coords: &mut Iter<'_, f64> ) -> EllipticalArc
Consumes 7 coordinates and creates an arc segment.
sourcefn to_packed_and_coords(&self, coords: &mut Vec<f64>) -> PackedCommand
fn to_packed_and_coords(&self, coords: &mut Vec<f64>) -> PackedCommand
Pushes 7 coordinates to coords
and returns one of PackedCommand::Arc*
.
Trait Implementations§
source§impl Clone for EllipticalArc
impl Clone for EllipticalArc
source§fn clone(&self) -> EllipticalArc
fn clone(&self) -> EllipticalArc
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EllipticalArc
impl Debug for EllipticalArc
source§impl PartialEq for EllipticalArc
impl PartialEq for EllipticalArc
source§fn eq(&self, other: &EllipticalArc) -> bool
fn eq(&self, other: &EllipticalArc) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for EllipticalArc
Auto Trait Implementations§
impl RefUnwindSafe for EllipticalArc
impl Send for EllipticalArc
impl Sync for EllipticalArc
impl Unpin for EllipticalArc
impl UnwindSafe for EllipticalArc
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
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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.