Module fermium::surface

source ·
Expand description

Module for SDL’s in-memory bitmap type.

Structs

A newtype’d c_void.
Represents a bitmap image in CPU memory.
The formula used for converting between YUV and RGB.

Constants

Surface is referenced internally
Surface uses preallocated memory
Surface is RLE encoded
Surface uses aligned memory
BT.601 for SD content, BT.709 for HD content
BT.601 (the default)

Functions

This is the public scaled blit function, SDL_BlitScaled(), and it performs rectangle validation and clipping before passing it to SDL_LowerBlitScaled()
Performs a fast blit from the source surface to the destination surface.
Copy a block of pixels of one format to another format
Creates a new surface of the specified format, and then copies and maps the given surface to it so the blit of the converted surface will be as fast as possible. If this function fails, it returns NULL.
Allocate a new RGB surface.
Makes a surface from a pre-allocated buffer.
Similar to SDL_CreateRGBSurface, but using a pixel format enum value.
Makes a surface from a pre-allocated buffer in a specified format.
Creates a new surface identical to the existing surface
Performs a fast fill of the given rectangle with color.
Frees the surface.
Gets the clipping rectangle for the destination surface in a blit.
Gets the color key (transparent pixel) in a blit-able surface.
Get the blend mode used for blit operations.
Get the additional color value used in blit operations.
Get the YUV conversion mode
Get the YUV conversion mode.
Returns whether the surface has a color key
Returns whether the surface is RLE enabled
Given a file path to a BMP file, load and parse it into an SDL_Surface as one step.
Load a surface from a seekable SDL data stream (memory or file).
Sets up a surface for directly accessing the pixels.
Checks if an SDL_Surface must be locked before the pixels are accessed directly.
Save an SDL_Surface to the file path specified.
Save a surface to a seekable SDL data stream (memory or file).
Sets the clipping rectangle for the destination surface in a blit.
Sets the color key (transparent pixel) in a blit-able surface.
Get the additional alpha value used in blit operations.
Set the blend mode used for blit operations.
Set an additional color value used in blit operations.
Set the palette used by a surface.
Sets the RLE acceleration hint for a surface.
Set the YUV conversion mode
Perform bilinear scaling between two surfaces of the same format, 32BPP.