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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.