Struct font_kit::outline::PointFlags
source · [−]pub struct PointFlags { /* private fields */ }Expand description
Flags that specify what type of point the corresponding position represents.
Implementations
sourceimpl PointFlags
impl PointFlags
sourcepub const CONTROL_POINT_0: PointFlags
pub const CONTROL_POINT_0: PointFlags
This point is the control point of a quadratic Bézier curve or the first control point of a cubic Bézier curve.
This flag is mutually exclusive with CONTROL_POINT_1.
sourcepub const CONTROL_POINT_1: PointFlags
pub const CONTROL_POINT_1: PointFlags
This point is the second control point of a cubic Bézier curve.
This flag is mutually exclusive with CONTROL_POINT_0.
sourcepub const fn empty() -> PointFlags
pub const fn empty() -> PointFlags
Returns an empty set of flags
sourcepub const fn all() -> PointFlags
pub const fn all() -> PointFlags
Returns the set containing all flags.
sourcepub fn from_bits(bits: u8) -> Option<PointFlags>
pub fn from_bits(bits: u8) -> Option<PointFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: u8) -> PointFlags
pub const fn from_bits_truncate(bits: u8) -> PointFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const fn intersects(&self, other: PointFlags) -> bool
pub const fn intersects(&self, other: PointFlags) -> bool
Returns true if there are flags common to both self and other.
sourcepub const fn contains(&self, other: PointFlags) -> bool
pub const fn contains(&self, other: PointFlags) -> bool
Returns true all of the flags in other are contained within self.
sourcepub fn insert(&mut self, other: PointFlags)
pub fn insert(&mut self, other: PointFlags)
Inserts the specified flags in-place.
sourcepub fn remove(&mut self, other: PointFlags)
pub fn remove(&mut self, other: PointFlags)
Removes the specified flags in-place.
sourcepub fn toggle(&mut self, other: PointFlags)
pub fn toggle(&mut self, other: PointFlags)
Toggles the specified flags in-place.
sourcepub fn set(&mut self, other: PointFlags, value: bool)
pub fn set(&mut self, other: PointFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
sourceimpl Binary for PointFlags
impl Binary for PointFlags
sourceimpl BitAnd<PointFlags> for PointFlags
impl BitAnd<PointFlags> for PointFlags
sourcefn bitand(self, other: PointFlags) -> PointFlags
fn bitand(self, other: PointFlags) -> PointFlags
Returns the intersection between the two sets of flags.
type Output = PointFlags
type Output = PointFlags
The resulting type after applying the & operator.
sourceimpl BitAndAssign<PointFlags> for PointFlags
impl BitAndAssign<PointFlags> for PointFlags
sourcefn bitand_assign(&mut self, other: PointFlags)
fn bitand_assign(&mut self, other: PointFlags)
Disables all flags disabled in the set.
sourceimpl BitOr<PointFlags> for PointFlags
impl BitOr<PointFlags> for PointFlags
sourcefn bitor(self, other: PointFlags) -> PointFlags
fn bitor(self, other: PointFlags) -> PointFlags
Returns the union of the two sets of flags.
type Output = PointFlags
type Output = PointFlags
The resulting type after applying the | operator.
sourceimpl BitOrAssign<PointFlags> for PointFlags
impl BitOrAssign<PointFlags> for PointFlags
sourcefn bitor_assign(&mut self, other: PointFlags)
fn bitor_assign(&mut self, other: PointFlags)
Adds the set of flags.
sourceimpl BitXor<PointFlags> for PointFlags
impl BitXor<PointFlags> for PointFlags
sourcefn bitxor(self, other: PointFlags) -> PointFlags
fn bitxor(self, other: PointFlags) -> PointFlags
Returns the left flags, but with all the right flags toggled.
type Output = PointFlags
type Output = PointFlags
The resulting type after applying the ^ operator.
sourceimpl BitXorAssign<PointFlags> for PointFlags
impl BitXorAssign<PointFlags> for PointFlags
sourcefn bitxor_assign(&mut self, other: PointFlags)
fn bitxor_assign(&mut self, other: PointFlags)
Toggles the set of flags.
sourceimpl Clone for PointFlags
impl Clone for PointFlags
sourcefn clone(&self) -> PointFlags
fn clone(&self) -> PointFlags
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for PointFlags
impl Debug for PointFlags
sourceimpl Extend<PointFlags> for PointFlags
impl Extend<PointFlags> for PointFlags
sourcefn extend<T: IntoIterator<Item = PointFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = PointFlags>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl FromIterator<PointFlags> for PointFlags
impl FromIterator<PointFlags> for PointFlags
sourcefn from_iter<T: IntoIterator<Item = PointFlags>>(iterator: T) -> PointFlags
fn from_iter<T: IntoIterator<Item = PointFlags>>(iterator: T) -> PointFlags
Creates a value from an iterator. Read more
sourceimpl Hash for PointFlags
impl Hash for PointFlags
sourceimpl LowerHex for PointFlags
impl LowerHex for PointFlags
sourceimpl Not for PointFlags
impl Not for PointFlags
sourcefn not(self) -> PointFlags
fn not(self) -> PointFlags
Returns the complement of this set of flags.
type Output = PointFlags
type Output = PointFlags
The resulting type after applying the ! operator.
sourceimpl Octal for PointFlags
impl Octal for PointFlags
sourceimpl Ord for PointFlags
impl Ord for PointFlags
sourceimpl PartialEq<PointFlags> for PointFlags
impl PartialEq<PointFlags> for PointFlags
sourcefn eq(&self, other: &PointFlags) -> bool
fn eq(&self, other: &PointFlags) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &PointFlags) -> bool
fn ne(&self, other: &PointFlags) -> bool
This method tests for !=.
sourceimpl PartialOrd<PointFlags> for PointFlags
impl PartialOrd<PointFlags> for PointFlags
sourcefn partial_cmp(&self, other: &PointFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &PointFlags) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl Sub<PointFlags> for PointFlags
impl Sub<PointFlags> for PointFlags
sourcefn sub(self, other: PointFlags) -> PointFlags
fn sub(self, other: PointFlags) -> PointFlags
Returns the set difference of the two sets of flags.
type Output = PointFlags
type Output = PointFlags
The resulting type after applying the - operator.
sourceimpl SubAssign<PointFlags> for PointFlags
impl SubAssign<PointFlags> for PointFlags
sourcefn sub_assign(&mut self, other: PointFlags)
fn sub_assign(&mut self, other: PointFlags)
Disables all flags enabled in the set.
sourceimpl UpperHex for PointFlags
impl UpperHex for PointFlags
impl Copy for PointFlags
impl Eq for PointFlags
impl StructuralEq for PointFlags
impl StructuralPartialEq for PointFlags
Auto Trait Implementations
impl RefUnwindSafe for PointFlags
impl Send for PointFlags
impl Sync for PointFlags
impl Unpin for PointFlags
impl UnwindSafe for PointFlags
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more