Struct lyon_geom::Arc
[−]
[src]
pub struct Arc<S> { pub center: Point<S>, pub radii: Vector<S>, pub start_angle: Angle<S>, pub sweep_angle: Angle<S>, pub x_rotation: Angle<S>, }
An ellipic arc curve segment.
Fields
center: Point<S>
radii: Vector<S>
start_angle: Angle<S>
sweep_angle: Angle<S>
x_rotation: Angle<S>
Methods
impl<S: Scalar> Arc<S>
[src]
fn from_svg_arc(arc: &SvgArc<S>) -> Arc<S>
[src]
fn to_svg_arc(&self) -> SvgArc<S>
[src]
fn for_each_quadratic_bezier<F>(&self, cb: &mut F) where
F: FnMut(&QuadraticBezierSegment<S>),
[src]
F: FnMut(&QuadraticBezierSegment<S>),
fn sample(&self, t: S) -> Point<S>
[src]
Sample the curve at t (expecting t between 0 and 1).
fn x(&self, t: S) -> S
[src]
fn y(&self, t: S) -> S
[src]
fn sample_tangent(&self, t: S) -> Vector<S>
[src]
Sample the curve's tangent at t (expecting t between 0 and 1).
fn get_angle(&self, t: S) -> Angle<S>
[src]
Sample the curve's angle at t (expecting t between 0 and 1).
fn end_angle(&self) -> Angle<S>
[src]
fn from(&self) -> Point<S>
[src]
fn to(&self) -> Point<S>
[src]
fn split_range(&self, t_range: Range<S>) -> Self
[src]
Return the sub-curve inside a given range of t.
This is equivalent splitting at the range's end points.
fn split(&self, t: S) -> (Arc<S>, Arc<S>)
[src]
Split this curve into two sub-curves.
fn before_split(&self, t: S) -> Arc<S>
[src]
Return the curve before the split point.
fn after_split(&self, t: S) -> Arc<S>
[src]
Return the curve after the split point.
fn flip(&self) -> Self
[src]
Swap the direction of the segment.
fn for_each_flattened<F: FnMut(Point<S>)>(
&self,
tolerance: S,
call_back: &mut F
)
[src]
&self,
tolerance: S,
call_back: &mut F
)
Approximates the arc with a sequence of line segments.
fn flattening_step(&self, tolerance: S) -> S
[src]
Finds the interval of the begining of the curve that can be approximated with a line segment.
fn flattened(&self, tolerance: S) -> Flattened<S>
[src]
Returns the flattened representation of the curve as an iterator, starting after the current point.
fn bounding_rect(&self) -> Rect<S>
[src]
Returns a conservative rectangle that contains the curve.
fn bounding_range_x(&self) -> (S, S)
[src]
fn bounding_range_y(&self) -> (S, S)
[src]
fn approximate_length(&self, tolerance: S) -> S
[src]
Trait Implementations
impl<S: Copy> Copy for Arc<S>
[src]
impl<S: Clone> Clone for Arc<S>
[src]
fn clone(&self) -> Arc<S>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<S: Debug> Debug for Arc<S>
[src]
impl<S: PartialEq> PartialEq for Arc<S>
[src]
fn eq(&self, __arg_0: &Arc<S>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Arc<S>) -> bool
[src]
This method tests for !=
.
impl<S: Scalar> Segment for Arc<S>
[src]
type Scalar = S
fn from(&self) -> Point<S>
[src]
Start of the curve.
fn to(&self) -> Point<S>
[src]
End of the curve.
fn sample(&self, t: S) -> Point<S>
[src]
Sample the curve at t (expecting t between 0 and 1).
fn x(&self, t: S) -> S
[src]
Sample x at t (expecting t between 0 and 1).
fn y(&self, t: S) -> S
[src]
Sample y at t (expecting t between 0 and 1).
fn derivative(&self, t: S) -> Vector<S>
[src]
Sample the derivative at t (expecting t between 0 and 1).
fn split_range(&self, t_range: Range<S>) -> Self
[src]
Return the curve inside a given range of t. Read more
fn split(&self, t: S) -> (Self, Self)
[src]
Split this curve into two sub-curves.
fn before_split(&self, t: S) -> Self
[src]
Return the curve before the split point.
fn after_split(&self, t: S) -> Self
[src]
Return the curve after the split point.
fn flip(&self) -> Self
[src]
Swap the direction of the segment.
fn approximate_length(&self, tolerance: S) -> S
[src]
Compute the length of the segment using a flattened approximation.
fn dx(&self, t: Self::Scalar) -> Self::Scalar
[src]
Sample x derivative at t (expecting t between 0 and 1).
fn dy(&self, t: Self::Scalar) -> Self::Scalar
[src]
Sample y derivative at t (expecting t between 0 and 1).
impl<S: Scalar> FlatteningStep for Arc<S>
[src]
fn flattening_step(&self, tolerance: S) -> S
[src]
Find the interval of the begining of the curve that can be approximated with a line segment. Read more
fn flattened(self, tolerance: Self::Scalar) -> Flattened<Self::Scalar, Self>
[src]
Returns the flattened representation of the curve as an iterator, starting after the current point. Read more