Struct breadx::image::Image[][src]

pub struct Image<Data> {
Show fields pub width: usize, pub height: usize, pub x_offset: usize, pub format: ImageFormat, pub depth: u8, pub bit_order: ImageOrder, pub byte_order: ImageOrder, pub bitmap_unit: u8, pub bitmap_pad: u32, pub bytes_per_line: usize, pub bits_per_pixel: u8, pub red_mask: u32, pub green_mask: u32, pub blue_mask: u32, pub data: Data,
}
Expand description

An image. This acts as a wrapper around data that represents an image.

Fields

width: usize

The width of this image.

height: usize

The height of this image.

x_offset: usize

Number of pixels offset in the X direction.

format: ImageFormat

Format for this image.

depth: u8

The depth of this image.

bit_order: ImageOrder

Bit order of this image.

byte_order: ImageOrder

Byte order of this image.

bitmap_unit: u8

The quantity of the scanline (usually 8, 16, or 32)

bitmap_pad: u32bytes_per_line: usizebits_per_pixel: u8red_mask: u32

Red mask.

green_mask: u32

Green mask.

blue_mask: u32

Blue mask.

data: Data

The data contained within this image.

Implementations

Get the pixel at the specified index.

Create a new image, given its associated connection, visual type, depth, format, offset (should be zero unless the data starts partway into the collection), width, height, scanline quantum (8, 16, or 32) and the number of bytes per line (how many bytes between a pixel on one line and a pixel with the same X position on another line?)

Get a reference to the interior data.

Clone this image to an equivalent but with a boxed slice as its data.

Set a pixel at the specified coordinates to the specified value.

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

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 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)

recently added

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.