logo
pub struct Stroke<'a> {
    pub color: Color,
    pub width: f32,
    pub line_cap: LineCap,
    pub line_join: LineJoin,
    pub line_dash: LineDash<'a>,
}
Available on crate feature pure only.
Expand description

The style of a stroke.

Fields

color: Color

The color of the stroke.

width: f32

The distance between the two edges of the stroke.

line_cap: LineCap

The shape to be used at the end of open subpaths when they are stroked.

line_join: LineJoin

The shape to be used at the corners of paths or basic shapes when they are stroked.

line_dash: LineDash<'a>

The dash pattern used when stroking the line.

Implementations

Available on crate feature canvas only.

Sets the color of the Stroke.

Available on crate feature canvas only.

Sets the width of the Stroke.

Available on crate feature canvas only.

Sets the LineCap of the Stroke.

Available on crate feature canvas only.

Sets the LineJoin of the Stroke.

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

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

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.