pub struct NoiseOptions {
pub count: u32,
pub size: u32,
pub blur_sigma: f32,
pub alpha: u8,
pub color_range: (u8, u8),
pub shape: NoisePattern,
pub red: bool,
pub green: bool,
pub blue: bool,
}Expand description
Parameters for the noise watermark drawn over the composed sprite.
Fields§
§count: u32Number of noise marks. Capped at 1_000_000.
count multiplied by the pixels one mark
covers (1, size, or size squared, by
pattern) must not exceed 4_000_000.
size: u32Edge length of one mark, in pixels,
for NoisePattern::Lines
and NoisePattern::Grid.
Capped at 64.
blur_sigma: f32Gaussian blur applied after the noise. Zero disables it. Capped at 32.0.
alpha: u8Opacity of each mark, 0 (invisible) to 255 (opaque). Marks are alpha-blended onto the sprite.
color_range: (u8, u8)Inclusive channel range each mark’s colour
is drawn from. .0 must not exceed .1.
shape: NoisePattern§red: bool§green: bool§blue: boolImplementations§
Source§impl NoiseOptions
impl NoiseOptions
Trait Implementations§
Source§impl Clone for NoiseOptions
impl Clone for NoiseOptions
Source§fn clone(&self) -> NoiseOptions
fn clone(&self) -> NoiseOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NoiseOptions
Source§impl Debug for NoiseOptions
impl Debug for NoiseOptions
Auto Trait Implementations§
impl Freeze for NoiseOptions
impl RefUnwindSafe for NoiseOptions
impl Send for NoiseOptions
impl Sync for NoiseOptions
impl Unpin for NoiseOptions
impl UnsafeUnpin for NoiseOptions
impl UnwindSafe for NoiseOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.