Struct ggez::graphics::Image [] [src]

pub struct Image { /* fields omitted */ }

In-memory image data available to be drawn on the screen.

Methods

impl Image
[src]

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

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.

Returns the dimensions of the image.

Returns the BlendMode of the image.

Sets the BlendMode of the image. See https://wiki.libsdl.org/SDL_SetRenderDrawBlendMode for detailed description of blend modes.

Get the color mod of the image.

Set the color mod of the image. Each pixel of the image is multiplied by this color when drawn.

Get the alpha mod of the image.

Set the alpha mod of the image. Each pixel's alpha will be multiplied by this value when drawn.

Return the width of the image.

Return the height of the image.

Trait Implementations

impl Debug for Image
[src]

Formats the value using the given formatter.

impl Drawable for Image
[src]

Actually draws the object to the screen. This is the most general version of the operation, which is all that is required for implementing this trait. (It also maps nicely onto SDL2's Renderer::copy_ex(), we might want to wrap the types up a bit more nicely someday.) Read more

Draws the drawable onto the rendering target.