Struct rich_sdl2_image_rust::surface::ImgSurface[][src]

pub struct ImgSurface<'img> { /* fields omitted */ }
Expand description

An image surface for the loaded picture.

Implementations

Constructs a new image surface from the file. The format will automatically determined if file_type is None. file_type is case-insensitive and can be one of these:

  • "TGA"
  • "CUR"
  • "ICO"
  • "BMP"
  • "GIF"
  • "JPG"
  • "LBM"
  • "PCX"
  • "PNG"
  • "PNM"
  • "SVG"
  • "TIF"
  • "XCF"
  • "XPM"
  • "XV"
  • "WEBP"

Panics

Panics if file_name or file_type is an empty string.

Constructs a new image surface from XPM format str slice.

Trait Implementations

Executes the destructor for this type. Read more

Returns the raw non-null pointer.

Clones the surface.

Clips the surface by area.

Changes blend mode of the surface.

Modifies the alpha of the surface.

Modifies the color of the surface.

Fills in the area with the color, or whole if area is None.

Fills in the areas with the color.

Overwrites the palette of the surface.

Copies src_area area in the surface into dst_pos on another surface.

Run-length encodes the surface.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Saves the surface image as BMP format.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

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.