FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    from_light

    fn from_light(light: &Rc<CompositionLight>) -> Option<DistantLight>
    

    The handle of light as this class, if it is one.

    Source

    color

    fn color(self: &Self) -> Color
    

    The colour of the light (default white).

    Source

    set_color

    fn set_color(self: &Self, value: Color)
    

    Source

    coordinate_space

    fn coordinate_space(self: &Self) -> Option<Rc<CompositionVisual>>
    

    The visual whose coordinates Direction is in; None for the targeted visual.

    Source

    set_coordinate_space

    fn set_coordinate_space(self: &Self, value: Option<Rc<CompositionVisual>>)
    

    Source

    direction

    fn direction(self: &Self) -> Vector3D
    

    The direction the light shines in (default (0, 0, -1): straight at a visual, which faces +Z).

    Source

    set_direction

    fn set_direction(self: &Self, value: Vector3D)
    

    Source

    intensity

    fn intensity(self: &Self) -> f32
    

    The intensity of the light (default 1).

    Source

    set_intensity

    fn set_intensity(self: &Self, value: f32)
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Receiver
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Deref

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.