pub struct Backdrop {
pub image: ImageId,
pub rect: Rect,
pub blur_px: f32,
pub sampling: u8,
pub cell_px: f32,
pub refraction: [f32; 4],
pub legible: [f32; 2],
pub ground: [f32; 4],
pub stage: Option<BackdropStage>,
pub below: Encoding,
}Expand description
A floating surface’s blurred backdrop.
Fields§
§image: ImageIdThe placeholder image the frame draws, which the service replaces with the blur.
rect: RectWhere the placeholder lands, in surface pixels.
blur_px: f32Blur standard deviation, in surface pixels.
sampling: u8The sampling the surface asked for, after the blur: 0 smooth, 1
at one colour per cell of cell_px (a surface shown as pixels).
cell_px: f32The cell’s side in surface pixels, where sampling is blocky; 0
otherwise.
refraction: [f32; 4]The lens the backdrop is bent through, in surface pixels: the
displacement at the rim (0 bends nothing), the band it eases
across, the rounded rect’s corner radius, and the fraction red and
blue are set apart by.
legible: [f32; 2]The relative luminances, darkest and lightest, what shows through
is compressed into so text over the surface stays legible; 0, 1
compresses nothing.
ground: [f32; 4]What the backdrop shows where nothing below covers it.
stage: Option<BackdropStage>The theme’s material stage the service runs over the blurred backdrop: its WGSL, which the
service checks before it compiles it, and its uniforms. None shows the backdrop as it is.
below: EncodingEverything composed below the surface.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Backdrop
impl !UnwindSafe for Backdrop
impl Forget for Backdrop
impl Freeze for Backdrop
impl Move for Backdrop
impl Send for Backdrop
impl Sync for Backdrop
impl Unpin for Backdrop
impl UnsafeUnpin for Backdrop
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> 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> ⓘ
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