pub struct GlassSpectrum {
pub angle_radians: f32,
pub step_dp: f32,
pub vertical_scale: f32,
pub opacity_near: f32,
pub opacity_far: f32,
pub fade_depth_dp: f32,
pub extent_dp: f32,
}Expand description
Seven-tap RGB spectrum for an edge lens. Distances follow the surface transform. Nonfinite values, negative extents, or opacities outside zero to one are ignored.
Fields§
§angle_radians: f32Angle θ in radians. For outward normal (x, y), the sampling direction is (y cosθ + x sinθ, (x cosθ − y sinθ) × vertical_scale).
step_dp: f32Signed spacing between adjacent taps, in dp; negative values reverse the colors.
vertical_scale: f32Scale of the vertical component of the sampling direction.
opacity_near: f32Spectral opacity at the silhouette edge.
opacity_far: f32Spectral opacity at and beyond the fade depth.
fade_depth_dp: f32Inward distance in dp over which opacity interpolates linearly.
extent_dp: f32Inward distance in dp beyond which the spectrum disappears.
Trait Implementations§
Source§impl Clone for GlassSpectrum
impl Clone for GlassSpectrum
impl Copy for GlassSpectrum
Source§impl Debug for GlassSpectrum
impl Debug for GlassSpectrum
Source§impl PartialEq for GlassSpectrum
impl PartialEq for GlassSpectrum
impl StructuralPartialEq for GlassSpectrum
Auto Trait Implementations§
impl Freeze for GlassSpectrum
impl RefUnwindSafe for GlassSpectrum
impl Send for GlassSpectrum
impl Sync for GlassSpectrum
impl Unpin for GlassSpectrum
impl UnsafeUnpin for GlassSpectrum
impl UnwindSafe for GlassSpectrum
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