pub struct CompositeParams {
pub dest_rect_px: Rect,
pub opacity: f32,
pub blend_mode: BlendMode,
}Expand description
Parameters for compositing an offscreen result into the main pass.
§Examples
use ailloli_ui_core::Rect;
use ailloli_ui_render_wgpu::CompositeParams;
use ailloli_ui_runtime::BlendMode;
let params = CompositeParams {
dest_rect_px: Rect::new(0.0, 0.0, 32.0, 16.0),
opacity: 0.75,
blend_mode: BlendMode::Normal,
};
assert_eq!(params.opacity, 0.75);Fields§
§dest_rect_px: RectDestination rectangle in physical framebuffer pixels.
opacity: f32Group opacity multiplier; planning normally keeps it in [0, 1].
blend_mode: BlendModeBlend operation used when recombining with the destination.
Trait Implementations§
Source§impl Clone for CompositeParams
impl Clone for CompositeParams
Source§fn clone(&self) -> CompositeParams
fn clone(&self) -> CompositeParams
Returns a copy 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 CompositeParams
impl Debug for CompositeParams
Source§impl PartialEq for CompositeParams
impl PartialEq for CompositeParams
impl Copy for CompositeParams
impl StructuralPartialEq for CompositeParams
Auto Trait Implementations§
impl Freeze for CompositeParams
impl RefUnwindSafe for CompositeParams
impl Send for CompositeParams
impl Sync for CompositeParams
impl Unpin for CompositeParams
impl UnwindSafe for CompositeParams
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.
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