#[non_exhaustive]pub struct CompositeGroupDesc {
pub bounds: Rect,
pub mode: BlendMode,
pub quality: EffectQuality,
pub opacity: f32,
}Expand description
Descriptor for an isolated compositing group (ADR 0247).
The group is rendered into an offscreen intermediate and then composited back onto the parent
target using the requested mode. bounds is a computation bound (not an implicit clip).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.bounds: RectComputation bounds (not an implicit clip), see ADR 0247.
mode: BlendMode§quality: EffectQuality§opacity: f32Group-level opacity multiplier applied when the group is composited back to its parent.
This enables CSS-like isolated opacity semantics (e.g. saveLayerAlpha): overlapping
children inside the group blend with each other normally, then the final group result is
multiplied by this opacity.
Default: 1.0.
Implementations§
Source§impl CompositeGroupDesc
impl CompositeGroupDesc
pub const fn new(bounds: Rect, mode: BlendMode, quality: EffectQuality) -> Self
pub fn with_opacity(self, opacity: f32) -> Self
Trait Implementations§
Source§impl Clone for CompositeGroupDesc
impl Clone for CompositeGroupDesc
Source§fn clone(&self) -> CompositeGroupDesc
fn clone(&self) -> CompositeGroupDesc
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompositeGroupDesc
impl Debug for CompositeGroupDesc
Source§impl PartialEq for CompositeGroupDesc
impl PartialEq for CompositeGroupDesc
impl Copy for CompositeGroupDesc
impl StructuralPartialEq for CompositeGroupDesc
Auto Trait Implementations§
impl Freeze for CompositeGroupDesc
impl RefUnwindSafe for CompositeGroupDesc
impl Send for CompositeGroupDesc
impl Sync for CompositeGroupDesc
impl Unpin for CompositeGroupDesc
impl UnsafeUnpin for CompositeGroupDesc
impl UnwindSafe for CompositeGroupDesc
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