pub struct EdgeFade {
pub bounds: Bounds<Pixels>,
pub band: Pixels,
pub top: bool,
pub bottom: bool,
pub left: bool,
pub right: bool,
}Expand description
A scoped vertical edge fade (see Window::with_edge_fade): primitives
painted inside the scope get their opacity multiplied by a ramp that runs
from 0 at an active edge of bounds to 1 a band further in. Built for
scroll-edge fades over translucent/blurred window backgrounds, where a
backdrop-colored gradient overlay cannot exist (there is no paintable
color equal to “what is behind the window”).
Fields§
§bounds: Bounds<Pixels>The faded region, in window coordinates.
band: PixelsRamp height inside each active edge.
top: boolFade primitives approaching the region’s top edge.
bottom: boolFade primitives approaching the region’s bottom edge.
left: boolFade primitives approaching the region’s left edge.
right: boolFade primitives approaching the region’s right edge.
Trait Implementations§
impl Copy for EdgeFade
impl StructuralPartialEq for EdgeFade
Auto Trait Implementations§
impl Freeze for EdgeFade
impl RefUnwindSafe for EdgeFade
impl Send for EdgeFade
impl Sync for EdgeFade
impl Unpin for EdgeFade
impl UnsafeUnpin for EdgeFade
impl UnwindSafe for EdgeFade
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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