pub struct SceneLayer<E> {
pub opacity: f32,
pub blend_mode: BlendMode,
pub clip: Option<ClipRegion>,
pub mask: Option<Vec<SceneNode>>,
pub mask_mode: MaskMode,
pub filters: Vec<SceneFilter>,
pub shadow: Option<SceneShadow>,
pub child: E,
}Expand description
Creates an offscreen compositing boundary around emitted children.
Fields§
§opacity: f32§blend_mode: BlendMode§clip: Option<ClipRegion>§mask: Option<Vec<SceneNode>>§mask_mode: MaskMode§filters: Vec<SceneFilter>§shadow: Option<SceneShadow>§child: EImplementations§
Source§impl<E> SceneLayer<E>
impl<E> SceneLayer<E>
pub fn new(child: E) -> SceneLayer<E>
pub fn with_opacity(self, opacity: f32) -> SceneLayer<E>
pub fn with_blend_mode(self, blend_mode: BlendMode) -> SceneLayer<E>
pub fn with_clip(self, clip: ClipRegion) -> SceneLayer<E>
pub fn with_mask( self, nodes: impl IntoIterator<Item = SceneNode>, mode: MaskMode, ) -> SceneLayer<E>
pub fn with_filter(self, filter: SceneFilter) -> SceneLayer<E>
pub fn with_shadow(self, shadow: SceneShadow) -> SceneLayer<E>
Trait Implementations§
Source§impl<E> SceneEmitter for SceneLayer<E>where
E: SceneEmitter,
impl<E> SceneEmitter for SceneLayer<E>where
E: SceneEmitter,
fn emit( &self, context: SceneFrameContext, props: &Value, scene: &mut Scene, ) -> Result<(), CompositionError>
Auto Trait Implementations§
impl<E> Freeze for SceneLayer<E>where
E: Freeze,
impl<E> RefUnwindSafe for SceneLayer<E>where
E: RefUnwindSafe,
impl<E> Send for SceneLayer<E>where
E: Send,
impl<E> Sync for SceneLayer<E>where
E: Sync,
impl<E> Unpin for SceneLayer<E>where
E: Unpin,
impl<E> UnsafeUnpin for SceneLayer<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for SceneLayer<E>where
E: UnwindSafe,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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