DistantLight
struct · ferroui-base · v0.5.0
struct DistantLight
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.
Members
from_lightcolorset_colorcoordinate_spaceset_coordinate_spacedirectionset_directionintensityset_intensity
from_light
fn from_light(light: &Rc<CompositionLight>) -> Option<DistantLight>
The handle of light as this class, if it is one.
color
fn color(self: &Self) -> Color
The colour of the light (default white).
set_color
fn set_color(self: &Self, value: Color)
coordinate_space
fn coordinate_space(self: &Self) -> Option<Rc<CompositionVisual>>
The visual whose coordinates Direction is in; None for the
targeted visual.
set_coordinate_space
fn set_coordinate_space(self: &Self, value: Option<Rc<CompositionVisual>>)
direction
fn direction(self: &Self) -> Vector3D
The direction the light shines in (default (0, 0, -1): straight at
a visual, which faces +Z).
set_direction
fn set_direction(self: &Self, value: Vector3D)
intensity
fn intensity(self: &Self) -> f32
The intensity of the light (default 1).
set_intensity
fn set_intensity(self: &Self, value: f32)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyToOwnedErasedDestructorIntoEitherCloneDeref
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.