pub struct SketchOptions {
pub amplitude_px: f32,
pub wavelength_px: f32,
pub seed: u32,
}Expand description
Hand-drawn (“sketch”) render-mode parameters. Every field has a default —
JSON {"mode":"sketch"} alone enables the mode with stock values
(serde(default)).
Fields§
§amplitude_px: f32Perpendicular path-displacement amplitude, in px. Default 1.5.
wavelength_px: f32Displacement wavelength, in px — one wobble per this arc length along the path. Default 60.0.
seed: u32Global seed. Same (config, data) → byte-identical output. Default 0.
Implementations§
Source§impl SketchOptions
impl SketchOptions
Sourcepub const PARAM_SPECS: &'static [StyleParamSpec]
pub const PARAM_SPECS: &'static [StyleParamSpec]
Parameter metadata for hosts — see StyleParamSpec. A model test
pins each default to Default, so the two cannot drift.
Trait Implementations§
Source§impl Clone for SketchOptions
impl Clone for SketchOptions
impl Copy for SketchOptions
Source§impl Debug for SketchOptions
impl Debug for SketchOptions
Source§impl Default for SketchOptions
impl Default for SketchOptions
Source§impl<'de> Deserialize<'de> for SketchOptionswhere
SketchOptions: Default,
impl<'de> Deserialize<'de> for SketchOptionswhere
SketchOptions: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SketchOptions
impl PartialEq for SketchOptions
Source§impl Serialize for SketchOptions
impl Serialize for SketchOptions
impl StructuralPartialEq for SketchOptions
Auto Trait Implementations§
impl Freeze for SketchOptions
impl RefUnwindSafe for SketchOptions
impl Send for SketchOptions
impl Sync for SketchOptions
impl Unpin for SketchOptions
impl UnsafeUnpin for SketchOptions
impl UnwindSafe for SketchOptions
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