pub struct DistantLight(/* private fields */);Expand description
A light from far away in one direction (WinUI
Microsoft.UI.Composition.DistantLight): every point of a flat
visual is lit alike, by the cosine of the angle between the direction
and the visual. Color, Direction and Intensity are animatable.
Implementations§
Source§impl DistantLight
impl DistantLight
Sourcepub fn from_light(light: &Rc<CompositionLight>) -> Option<DistantLight>
pub fn from_light(light: &Rc<CompositionLight>) -> Option<DistantLight>
The handle of light as this class, if it is one.
Sourcepub fn props(&self) -> &DistantLightProps
pub fn props(&self) -> &DistantLightProps
The generated properties of the class.
Source§impl DistantLight
impl DistantLight
pub fn set_color(&self, value: Color)
Sourcepub fn coordinate_space(&self) -> Option<Rc<CompositionVisual>>
pub fn coordinate_space(&self) -> Option<Rc<CompositionVisual>>
The visual whose coordinates Direction is in; None for the
targeted visual.
pub fn set_coordinate_space(&self, value: Option<Rc<CompositionVisual>>)
Sourcepub fn direction(&self) -> Vector3D
pub fn direction(&self) -> Vector3D
The direction the light shines in (default (0, 0, -1): straight at
a visual, which faces +Z).
pub fn set_direction(&self, value: Vector3D)
pub fn set_intensity(&self, value: f32)
Trait Implementations§
Source§impl Clone for DistantLight
impl Clone for DistantLight
Source§impl Deref for DistantLight
impl Deref for DistantLight
Source§type Target = Rc<CompositionLight>
type Target = Rc<CompositionLight>
The resulting type after dereferencing.
Source§fn deref(&self) -> &Rc<CompositionLight>
fn deref(&self) -> &Rc<CompositionLight>
Dereferences the value.
Auto Trait Implementations§
impl !RefUnwindSafe for DistantLight
impl !Send for DistantLight
impl !Sync for DistantLight
impl !UnwindSafe for DistantLight
impl Freeze for DistantLight
impl Unpin for DistantLight
impl UnsafeUnpin for DistantLight
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