pub struct ExtractedOpacityGroup {
pub alpha: f32,
pub start_order: PaintOrder,
pub end_order: PaintOrder,
pub key: u64,
}Expand description
One element whose paints composite as a single layer that fades as a whole: CSS group opacity.
- Emitted for an element with
Opacitybelow one that has a visible child in its own paint band. Its own paints and its descendants’ paint at full alpha into the layer, and the layer composites atalphawhen it closes, so a child over its parent hides the parent the way it would at full opacity, and the two fade once, together. - An element with no such child folds its opacity into its own paints instead; nothing of its own overlaps anything else of its own by more than a border or a text run, and a layer costs a pass.
Fields§
§alpha: f32The element’s own Opacity, in [0, 1).
start_order: PaintOrderPaint-order key at which the layer opens: the slot under the element’s own PaintOrder that
its drop shadows take, so they fade with the element.
end_order: PaintOrderPaint-order key at which the layer closes - the maximum PaintOrder across the element and its
descendants in the same paint band, as for an ExtractedClipBox.
key: u64The faded element’s identity, the same every frame, so a renderer can keep the group’s
layer from one frame to the next (crate::node_ir::Node::Opacity’s key).
Trait Implementations§
Source§impl Clone for ExtractedOpacityGroup
impl Clone for ExtractedOpacityGroup
Source§fn clone(&self) -> ExtractedOpacityGroup
fn clone(&self) -> ExtractedOpacityGroup
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Component for ExtractedOpacityGroup
impl Component for ExtractedOpacityGroup
Source§const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
A constant indicating the storage type used for this component.
Source§type Mutability = Mutable
type Mutability = Mutable
A marker type to assist Bevy with determining if this component is
mutable, or immutable. Mutable components will have
Component<Mutability = Mutable>,
while immutable components will instead have Component<Mutability = Immutable>. Read moreSource§fn register_required_components(
_requiree: ComponentId,
required_components: &mut RequiredComponentsRegistrator<'_, '_>,
)
fn register_required_components( _requiree: ComponentId, required_components: &mut RequiredComponentsRegistrator<'_, '_>, )
Registers required components. Read more
Source§fn clone_behavior() -> ComponentCloneBehavior
fn clone_behavior() -> ComponentCloneBehavior
Called when registering this component, allowing to override clone function (or disable cloning altogether) for this component. Read more
Source§fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
Returns [
ComponentRelationshipAccessor] required for working with relationships in dynamic contexts. Read more§fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
§fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
§fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
Maps the entities on this component using the given
EntityMapper. This is used to remap entities in contexts like scenes and entity cloning.
When deriving Component, this is populated by annotating fields containing entities with #[entities] Read moreSource§impl Debug for ExtractedOpacityGroup
impl Debug for ExtractedOpacityGroup
Source§impl PartialEq for ExtractedOpacityGroup
impl PartialEq for ExtractedOpacityGroup
Source§fn eq(&self, other: &ExtractedOpacityGroup) -> bool
fn eq(&self, other: &ExtractedOpacityGroup) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ExtractedOpacityGroup
impl StructuralPartialEq for ExtractedOpacityGroup
Auto Trait Implementations§
impl Freeze for ExtractedOpacityGroup
impl RefUnwindSafe for ExtractedOpacityGroup
impl Send for ExtractedOpacityGroup
impl Sync for ExtractedOpacityGroup
impl Unpin for ExtractedOpacityGroup
impl UnsafeUnpin for ExtractedOpacityGroup
impl UnwindSafe for ExtractedOpacityGroup
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
Mutably borrows from an owned value. Read more
§impl<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut ComponentsRegistrator<'_>, ) -> impl Iterator<Item = ComponentId> + use<C>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
§unsafe fn get_components(
ptr: MovingPtr<'_, C>,
func: &mut impl FnMut(StorageType, OwningPtr<'_>),
) -> <C as DynamicBundle>::Effect
unsafe fn get_components( ptr: MovingPtr<'_, C>, func: &mut impl FnMut(StorageType, OwningPtr<'_>), ) -> <C as DynamicBundle>::Effect
Moves the components out of the bundle. Read more
§unsafe fn apply_effect(
_ptr: MovingPtr<'_, MaybeUninit<C>>,
_entity: &mut EntityWorldMut<'_>,
)
unsafe fn apply_effect( _ptr: MovingPtr<'_, MaybeUninit<C>>, _entity: &mut EntityWorldMut<'_>, )
Applies the after-effects of spawning this bundle. Read more
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.