Function SDL_SetSurfaceAlphaMod
pub unsafe extern "C" fn SDL_SetSurfaceAlphaMod(
surface: *mut SDL_Surface,
alpha: u8,
) -> bool
Available on crate feature
dep_sdl3
only.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
: theSDL_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.
§Availability
This function is available since SDL 3.2.0.