Struct piston_window::Line[][src]

pub struct Line {
    pub color: [f32; 4],
    pub radius: f64,
    pub shape: Shape,
}
Expand description

A colored line with a default border radius

Fields

color: [f32; 4]

The line color

radius: f64

The line radius

shape: Shape

The line shape

Implementations

Creates a new line

Creates a new line

Sets color.

Sets radius.

Sets width.

Sets shape.

Draws line using default method between points.

Draws line using default method.

Draws line using triangulation.

Draws an arrow

Head size is the sides of the triangle between the arrow hooks and the line

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Multiplies with red, green, blue and alpha values.

Rotates hue by radians.

Mixes the current color with white. Read more

Mixes the current color with black. Read more

Rotates hue by degrees.

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.

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.