pub struct Config {
pub thickness: ScreenUnit,
pub export_padding: WorldUnit,
pub erase_radius: ScreenUnit,
pub point_snap_radius: ScreenUnit,
pub zoom_factor: f64,
pub background_color: Color,
pub stroke_color: Color,
pub scroll_factor: f64,
}
Fields
thickness: ScreenUnit
Thikness in pixels used by default while drawing.
export_padding: WorldUnit
Padding in pixels added to drawings while exporting.
erase_radius: ScreenUnit
If the cursor’s distance to a shape is less than this it will be considered to be touching and thus be erased.
point_snap_radius: ScreenUnit
When drawing polygons and possibly other shapes in the future this radius in screen units is used to decide if the cursor is touching a previous point of the current shape.
zoom_factor: f64
When pressing + and - keys on the keyboard the zoom increases and decreases by this factor (must be > 1 so that + zooms in).
background_color: Color
When creating a new drawing this will be the background color. Specified in CSS hexadecimal format, like ‘#cebada’
stroke_color: Color
When creating a new drawing this will be the starting color of the pen. Specified in CSS hexadecimal format.
scroll_factor: f64
multiply the scroll delta given by the scroll event by this factor to make it smoother or faster
Trait Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for Config
impl UnwindSafe for Config
Blanket Implementations
Mutably borrows from an owned value. Read more