pub struct LinearLayout { /* private fields */ }
Expand description

A linear buffer layout where each optionally strided pixel row of an image is saved sequentially into the buffer.

Implementations§

Creates a new linear layout from width, width_stride (in bytes) and height.

Examples
let layout = LinearLayout::new(2, 3 * 4, 4);

assert_eq!(layout.width(), 2);

Trait Implementations§

Formats the value using the given formatter. Read more
Width in pixels. Read more
Height in pixels. Read more
Number of buffer sub-slices that will be passes to Layout::write. Read more
Returns self-stored sub-slices of buffer which are stored in a SliceCache. Read more
Writes fill to slices, optionally calling the flusher. Read more
Width in tiles. Read more
Height in tiles. 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 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.