SDL_SetSurfaceAlphaMod

Function SDL_SetSurfaceAlphaMod 

Source
pub unsafe extern "C" fn SDL_SetSurfaceAlphaMod(
    surface: *mut SDL_Surface,
    alpha: Uint8,
) -> bool
Expand description

Set an additional alpha value used in blit operations.

When this surface is blitted, during the blit operation the source alpha value is modulated by this alpha value according to the following formula:

srcA = srcA * (alpha / 255)

§Parameters

  • surface: the SDL_Surface structure to update.
  • alpha: the alpha value multiplied into blit operations.

§Return value

Returns true on success or false on failure; call SDL_GetError() for more information.

§Thread safety

This function can be called on different threads with different surfaces.

§Availability

This function is available since SDL 3.2.0.

§See also