Type Definition ggez::graphics::Image[][src]

type Image = ImageGeneric<Resources>;

In-GPU-memory image data available to be drawn on the screen, using the OpenGL backend.

Under the hood this is just an Arc'ed texture handle and some metadata, so cloning it is fairly cheap; it doesn't make another copy of the underlying image data.

Methods

impl Image
[src]

Load a new image from the file at the given path.

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

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.

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.

Trait Implementations

impl Debug for Image
[src]

Formats the value using the given formatter. Read more

impl Drawable for Image
[src]

Actually draws the object to the screen. Read more

Sets the blend mode to be used when drawing this drawable. This overrides the general graphics::set_blend_mode(). If None is set, defers to the blend mode set by graphics::set_blend_mode(). Read more

Gets the blend mode to be used when drawing this drawable.

Draws the drawable onto the rendering target. Read more