Struct ggez::graphics::ImageGeneric[][src]

pub struct ImageGeneric<B> where
    B: BackendSpec
{ /* fields omitted */ }
Expand description

Generic in-GPU-memory image data available to be drawn on the screen. You probably just want to look at the Image type.

Implementations

A helper function to get the raw gfx texture handle

A helper function to get the raw gfx texture view

Return the width of the image.

Return the height of the image.

Get the filter mode for the image.

Set the filter mode for the image.

Returns the dimensions of the image.

Gets the Image’s WrapMode along the X and Y axes.

Sets the Image’s WrapMode along the X and Y axes.

Load a new image from the file at the given path. The documentation for the filesystem module explains how the path must be specified.

Creates a new Image from the given buffer, which should contain an image encoded in a supported image file format.

Creates a new Image from the given buffer, which should contain an image encoded in the given image file format.

Creates a new Image from the given buffer of u8 RGBA values.

The pixel layout is row-major. That is, the first 4 u8 values make the top-left pixel in the Image, the next 4 make the next pixel in the same row, and so on to the end of the row. The next width * 4 values make up the second row, and so on.

Dumps the Image’s data to a Vec of u8 RGBA values.

Encode the Image to the given file format and write it out to the given path.

See the filesystem module docs for where exactly the file will end up.

A little helper function that creates a new Image that is just a solid square of the given size and color. Mainly useful for debugging.

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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)

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.