pub enum PointType {
Move,
Line,
OffCurve,
Curve,
QCurve,
}
Expand description
Possible types of points that can exist in a Contour
.
Variants§
Move
A point of this type must be the first in a contour. The reverse is not true: a contour does not necessarily start with a move point. When a contour does start with a move point, it signifies the beginning of an open contour. A closed contour does not start with a move and is defined as a cyclic list of points, with no predominant start point. There is always a next point and a previous point. For this purpose the list of points can be seen as endless in both directions. The actual list of points can be rotated arbitrarily (by removing the first N points and appending them at the end) while still describing the same outline.
Line
Draw a straight line from the previous point to this point. The previous point must be a move, a line, a curve or a qcurve. It must not be an offcurve.
OffCurve
This point is part of a curve segment that goes up to the next point that is either a curve or a qcurve.
Curve
Draw a cubic bezier curve from the last non-offcurve point to this point. The number of offcurve points can be zero, one or two. If the number of offcurve points is zero, a straight line is drawn. If it is one, a quadratic curve is drawn. If it is two, a regular cubic bezier is drawn.
QCurve
Similar to curve, but uses quadratic curves, using the TrueType “implied on-curve points” principle.
Trait Implementations§
source§impl PartialEq for PointType
impl PartialEq for PointType
impl Eq for PointType
impl StructuralPartialEq for PointType
Auto Trait Implementations§
impl Freeze for PointType
impl RefUnwindSafe for PointType
impl Send for PointType
impl Sync for PointType
impl Unpin for PointType
impl UnwindSafe for PointType
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.