---
name: "SDL_SetSurfaceAlphaMod"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_SetSurfaceAlphaMod"
---

# SDL\_SetSurfaceAlphaMod(3)

Set an additional alpha value used in blit operations.

## NAME

SDL\_SetSurfaceAlphaMod - Set an additional alpha value used in blit operations.

## HEADER FILE

Defined in SDL3/SDL\_surface.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**bool SDL\_SetSurfaceAlphaMod(SDL\_Surface \*surface, Uint8 alpha);**

## DESCRIPTION

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)**

## FUNCTION 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 is not thread safe.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_GetSurfaceAlphaMod**(3)](/SDL_GetSurfaceAlphaMod/3.md), **•**(3), [**SDL\_SetSurfaceColorMod**(3)](/SDL_SetSurfaceColorMod/3.md)
