pub struct DrawListFlags { /* private fields */ }Expand description
Draw list flags
Implementations§
Source§impl DrawListFlags
impl DrawListFlags
Sourcepub const ANTI_ALIASED_LINES: DrawListFlags
pub const ANTI_ALIASED_LINES: DrawListFlags
Enable anti-aliased lines/borders (*2 the number of triangles for 1.0f wide line or lines thin enough to be drawn using textures, otherwise *3 the number of triangles)
Sourcepub const ANTI_ALIASED_LINES_USE_TEX: DrawListFlags
pub const ANTI_ALIASED_LINES_USE_TEX: DrawListFlags
Enable anti-aliased lines/borders using textures when possible. Require backend to render with bilinear filtering.
Sourcepub const ANTI_ALIASED_FILL: DrawListFlags
pub const ANTI_ALIASED_FILL: DrawListFlags
Enable anti-aliased edge around filled shapes (rounded rectangles, circles).
Sourcepub const ALLOW_VTX_OFFSET: DrawListFlags
pub const ALLOW_VTX_OFFSET: DrawListFlags
Can emit ‘VtxOffset > 0’ to allow large meshes. Set when
[BackendFlags::RENDERER_HAS_VTX_OFFSET] is enabled.
Sourcepub const fn empty() -> DrawListFlags
pub const fn empty() -> DrawListFlags
Returns an empty set of flags.
Sourcepub const fn all() -> DrawListFlags
pub const fn all() -> DrawListFlags
Returns the set containing all flags.
Sourcepub const fn from_bits(bits: u32) -> Option<DrawListFlags>
pub const fn from_bits(bits: u32) -> Option<DrawListFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u32) -> DrawListFlags
pub const fn from_bits_truncate(bits: u32) -> DrawListFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> DrawListFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> DrawListFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
§Safety
The caller of the bitflags! macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked() has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
Sourcepub const fn intersects(&self, other: DrawListFlags) -> bool
pub const fn intersects(&self, other: DrawListFlags) -> bool
Returns true if there are flags common to both self and other.
Sourcepub const fn contains(&self, other: DrawListFlags) -> bool
pub const fn contains(&self, other: DrawListFlags) -> bool
Returns true if all of the flags in other are contained within self.
Sourcepub fn insert(&mut self, other: DrawListFlags)
pub fn insert(&mut self, other: DrawListFlags)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: DrawListFlags)
pub fn remove(&mut self, other: DrawListFlags)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: DrawListFlags)
pub fn toggle(&mut self, other: DrawListFlags)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: DrawListFlags, value: bool)
pub fn set(&mut self, other: DrawListFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Sourcepub const fn intersection(self, other: DrawListFlags) -> DrawListFlags
pub const fn intersection(self, other: DrawListFlags) -> DrawListFlags
Returns the intersection between the flags in self and
other.
Specifically, the returned set contains only the flags which are
present in both self and other.
This is equivalent to using the & operator (e.g.
ops::BitAnd), as in flags & other.
Sourcepub const fn union(self, other: DrawListFlags) -> DrawListFlags
pub const fn union(self, other: DrawListFlags) -> DrawListFlags
Returns the union of between the flags in self and other.
Specifically, the returned set contains all flags which are
present in either self or other, including any which are
present in both (see Self::symmetric_difference if that
is undesirable).
This is equivalent to using the | operator (e.g.
ops::BitOr), as in flags | other.
Sourcepub const fn difference(self, other: DrawListFlags) -> DrawListFlags
pub const fn difference(self, other: DrawListFlags) -> DrawListFlags
Returns the difference between the flags in self and other.
Specifically, the returned set contains all flags present in
self, except for the ones present in other.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other (and this syntax is also supported).
This is equivalent to using the - operator (e.g.
ops::Sub), as in flags - other.
Sourcepub const fn symmetric_difference(self, other: DrawListFlags) -> DrawListFlags
pub const fn symmetric_difference(self, other: DrawListFlags) -> DrawListFlags
Returns the symmetric difference between the flags
in self and other.
Specifically, the returned set contains the flags present which
are present in self or other, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self and other.
This is equivalent to using the ^ operator (e.g.
ops::BitXor), as in flags ^ other.
Sourcepub const fn complement(self) -> DrawListFlags
pub const fn complement(self) -> DrawListFlags
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all() and self (e.g. Self::all() - self)
This is equivalent to using the ! operator (e.g.
ops::Not), as in !flags.
Trait Implementations§
Source§impl Binary for DrawListFlags
impl Binary for DrawListFlags
Source§impl BitAnd for DrawListFlags
impl BitAnd for DrawListFlags
Source§fn bitand(self, other: DrawListFlags) -> DrawListFlags
fn bitand(self, other: DrawListFlags) -> DrawListFlags
Returns the intersection between the two sets of flags.
Source§type Output = DrawListFlags
type Output = DrawListFlags
& operator.Source§impl BitAndAssign for DrawListFlags
impl BitAndAssign for DrawListFlags
Source§fn bitand_assign(&mut self, other: DrawListFlags)
fn bitand_assign(&mut self, other: DrawListFlags)
Disables all flags disabled in the set.
Source§impl BitOr for DrawListFlags
impl BitOr for DrawListFlags
Source§fn bitor(self, other: DrawListFlags) -> DrawListFlags
fn bitor(self, other: DrawListFlags) -> DrawListFlags
Returns the union of the two sets of flags.
Source§type Output = DrawListFlags
type Output = DrawListFlags
| operator.Source§impl BitOrAssign for DrawListFlags
impl BitOrAssign for DrawListFlags
Source§fn bitor_assign(&mut self, other: DrawListFlags)
fn bitor_assign(&mut self, other: DrawListFlags)
Adds the set of flags.
Source§impl BitXor for DrawListFlags
impl BitXor for DrawListFlags
Source§fn bitxor(self, other: DrawListFlags) -> DrawListFlags
fn bitxor(self, other: DrawListFlags) -> DrawListFlags
Returns the left flags, but with all the right flags toggled.
Source§type Output = DrawListFlags
type Output = DrawListFlags
^ operator.Source§impl BitXorAssign for DrawListFlags
impl BitXorAssign for DrawListFlags
Source§fn bitxor_assign(&mut self, other: DrawListFlags)
fn bitxor_assign(&mut self, other: DrawListFlags)
Toggles the set of flags.
Source§impl Clone for DrawListFlags
impl Clone for DrawListFlags
Source§fn clone(&self) -> DrawListFlags
fn clone(&self) -> DrawListFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DrawListFlags
impl Debug for DrawListFlags
Source§impl Extend<DrawListFlags> for DrawListFlags
impl Extend<DrawListFlags> for DrawListFlags
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = DrawListFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = DrawListFlags>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl FromIterator<DrawListFlags> for DrawListFlags
impl FromIterator<DrawListFlags> for DrawListFlags
Source§fn from_iter<T>(iterator: T) -> DrawListFlagswhere
T: IntoIterator<Item = DrawListFlags>,
fn from_iter<T>(iterator: T) -> DrawListFlagswhere
T: IntoIterator<Item = DrawListFlags>,
Source§impl Hash for DrawListFlags
impl Hash for DrawListFlags
Source§impl LowerHex for DrawListFlags
impl LowerHex for DrawListFlags
Source§impl Not for DrawListFlags
impl Not for DrawListFlags
Source§fn not(self) -> DrawListFlags
fn not(self) -> DrawListFlags
Returns the complement of this set of flags.
Source§type Output = DrawListFlags
type Output = DrawListFlags
! operator.Source§impl Octal for DrawListFlags
impl Octal for DrawListFlags
Source§impl Ord for DrawListFlags
impl Ord for DrawListFlags
Source§fn cmp(&self, other: &DrawListFlags) -> Ordering
fn cmp(&self, other: &DrawListFlags) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DrawListFlags
impl PartialEq for DrawListFlags
Source§impl PartialOrd for DrawListFlags
impl PartialOrd for DrawListFlags
Source§impl Sub for DrawListFlags
impl Sub for DrawListFlags
Source§fn sub(self, other: DrawListFlags) -> DrawListFlags
fn sub(self, other: DrawListFlags) -> DrawListFlags
Returns the set difference of the two sets of flags.
Source§type Output = DrawListFlags
type Output = DrawListFlags
- operator.Source§impl SubAssign for DrawListFlags
impl SubAssign for DrawListFlags
Source§fn sub_assign(&mut self, other: DrawListFlags)
fn sub_assign(&mut self, other: DrawListFlags)
Disables all flags enabled in the set.
Source§impl UpperHex for DrawListFlags
impl UpperHex for DrawListFlags
impl Copy for DrawListFlags
impl Eq for DrawListFlags
impl StructuralPartialEq for DrawListFlags
Auto Trait Implementations§
impl Freeze for DrawListFlags
impl RefUnwindSafe for DrawListFlags
impl Send for DrawListFlags
impl Sync for DrawListFlags
impl Unpin for DrawListFlags
impl UnwindSafe for DrawListFlags
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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