pub struct AuroraGenerator {
pub color_palette: NeonColor,
pub density: f64,
pub aspect_ratio_density_multiplier: f64,
}Expand description
A procedural generator for rendering wave-like Cosmic Aurora overlays.
Fields§
§color_palette: NeonColorThe base colour palette selected for the neon glow.
density: f64Base density frequency scaling factor.
aspect_ratio_density_multiplier: f64Density multiplier tailored to the active aspect ratio.
Implementations§
Source§impl AuroraGenerator
impl AuroraGenerator
Sourcepub fn new() -> WallSwitchResult<Self>
pub fn new() -> WallSwitchResult<Self>
Constructs a randomised, baseline Aurora configuration.
This acts as the core constructor, randomly selecting a color palette and frequency density before any monitor adjustments are applied.
Sourcepub fn random(monitor: &Monitor) -> WallSwitchResult<Self>
pub fn random(monitor: &Monitor) -> WallSwitchResult<Self>
Generates a randomised Aurora configuration adjusted to the target monitor’s aspect ratio.
Reuses new to initialize properties and calculates a density multiplier
to preserve the structural aspect ratio of the aurora waves.
Trait Implementations§
Source§impl ImageEffect for AuroraGenerator
impl ImageEffect for AuroraGenerator
Source§fn apply(&self, rgb_img: &mut RgbImage)
fn apply(&self, rgb_img: &mut RgbImage)
Applies the procedural effect in-place to a mutable image buffer.
Source§fn info(&self) -> String
fn info(&self) -> String
Returns a formatted string containing diagnostic details of the active effect.
Source§fn apply_effect(
&self,
input_path: &Path,
output_path: &Path,
) -> WallSwitchResult<()>
fn apply_effect( &self, input_path: &Path, output_path: &Path, ) -> WallSwitchResult<()>
Convenience helper: opens
input_path, runs the effect, writes output_path.Auto Trait Implementations§
impl Freeze for AuroraGenerator
impl RefUnwindSafe for AuroraGenerator
impl Send for AuroraGenerator
impl Sync for AuroraGenerator
impl Unpin for AuroraGenerator
impl UnsafeUnpin for AuroraGenerator
impl UnwindSafe for AuroraGenerator
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more