pub struct ThemeShadowVisual { /* private fields */ }Expand description
The shadow visual of a caster: created by the caster’s
Visual, shown by its parent before the caster’s own
visual.
Implementations§
Source§impl ThemeShadowVisual
impl ThemeShadowVisual
Sourcepub fn new(
caster: &Rc<CompositionVisual>,
recipe: &DropShadowRecipe,
) -> ThemeShadowVisual
pub fn new( caster: &Rc<CompositionVisual>, recipe: &DropShadowRecipe, ) -> ThemeShadowVisual
Creates the shadow visual of caster (the composition visual of the
caster): its transform is taken in the space of the caster
(ParentForTransform), its opacity follows the caster’s through an
expression (as UpdateDropShadowVisualOpacity does for an animated
opacity), and it is not hit-testable.
The handler starts with the shape of recipe, so that the first frame that shows the
visual draws the shadow (a message reaches the handler a frame later).
Sourcepub fn visual(&self) -> &Rc<CompositionVisual>
pub fn visual(&self) -> &Rc<CompositionVisual>
The composition visual.
Sourcepub fn update(&self, recipe: &DropShadowRecipe, size: Vector, visible: bool)
pub fn update(&self, recipe: &DropShadowRecipe, size: Vector, visible: bool)
Shows recipe around a caster of size, or nothing when visible is
false or the recipe draws nothing.
Sourcepub fn box_shadows(&self) -> Vec<BoxShadow>
pub fn box_shadows(&self) -> Vec<BoxShadow>
The box shadows the visual draws (for tests).
Auto Trait Implementations§
impl !Freeze for ThemeShadowVisual
impl !RefUnwindSafe for ThemeShadowVisual
impl !Send for ThemeShadowVisual
impl !Sync for ThemeShadowVisual
impl !UnwindSafe for ThemeShadowVisual
impl Unpin for ThemeShadowVisual
impl UnsafeUnpin for ThemeShadowVisual
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more