pub struct ShadowLight {
pub x: f32,
pub y: f32,
pub z: f32,
pub radius: f32,
pub pixels_per_unit: f32,
}Expand description
The light elevation shadows are cast by, in the units and coordinates the shadow is collected in.
Fields§
§x: f32§y: f32§z: f32§radius: f32§pixels_per_unit: f32Device pixels per unit: Skia scales the ambient penumbra by the caster’s height in pixels.
Implementations§
Source§impl ShadowLight
impl ShadowLight
Sourcepub fn for_window(
width: f32,
height: f32,
units_per_dp: f32,
pixels_per_unit: f32,
) -> Self
pub fn for_window( width: f32, height: f32, units_per_dp: f32, pixels_per_unit: f32, ) -> Self
The light over a window width × height units in size whose origin
is the collection origin, where one dp is units_per_dp units. Matches
Kotlin: ThreadedRenderer.setLightCenter on Android and its copy in
Compose Multiplatform’s GraphicsLayerOwnerLayer.skiko.kt.
Trait Implementations§
Source§impl Clone for ShadowLight
impl Clone for ShadowLight
impl Copy for ShadowLight
Source§impl Debug for ShadowLight
impl Debug for ShadowLight
Source§impl PartialEq for ShadowLight
impl PartialEq for ShadowLight
impl StructuralPartialEq for ShadowLight
Auto Trait Implementations§
impl Freeze for ShadowLight
impl RefUnwindSafe for ShadowLight
impl Send for ShadowLight
impl Sync for ShadowLight
impl Unpin for ShadowLight
impl UnsafeUnpin for ShadowLight
impl UnwindSafe for ShadowLight
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