Function fermium::surface::SDL_SetColorKey[][src]

pub unsafe extern "C" fn SDL_SetColorKey(
    surface: *mut SDL_Surface,
    flag: c_int,
    key: u32
) -> c_int

Sets the color key (transparent pixel) in a blit-able surface.

You can pass SDL_RLEACCEL to enable RLE accelerated blits.

  • surface: The surface to update
  • flag: Non-zero to enable colorkey and 0 to disable colorkey
  • key: The transparent pixel in the native surface format

Return: 0 on success, or -1 if the surface is not valid