Sync SDL3 wiki -> header

This commit is contained in:
SDL Wiki Bot 2024-07-13 21:32:39 +00:00
parent 650271af46
commit 2596482c3f

View File

@ -257,14 +257,24 @@ extern SDL_DECLSPEC SDL_Colorspace SDLCALL SDL_GetSurfaceColorspace(SDL_Surface
/**
* Create a palette and associate it with a surface.
*
* This function creates a palette compatible with the provided surface. The palette is then returned for you to modify, and the surface will automatically use the new palette in future operations. You do not need to destroy the returned palette, it will be freed when the reference count reaches 0, usually when the surface is destroyed.
* This function creates a palette compatible with the provided surface. The
* palette is then returned for you to modify, and the surface will
* automatically use the new palette in future operations. You do not need to
* destroy the returned palette, it will be freed when the reference count
* reaches 0, usually when the surface is destroyed.
*
* Bitmap surfaces (with format SDL_PIXELFORMAT_INDEX1LSB or SDL_PIXELFORMAT_INDEX1MSB) will have the palette initialized with 0 as white and 1 as black. Other surfaces will get a palette initialized with white in every entry.
* Bitmap surfaces (with format SDL_PIXELFORMAT_INDEX1LSB or
* SDL_PIXELFORMAT_INDEX1MSB) will have the palette initialized with 0 as
* white and 1 as black. Other surfaces will get a palette initialized with
* white in every entry.
*
* If this function is called for a surface that already has a palette, a new palette will be created to replace it.
* If this function is called for a surface that already has a palette, a new
* palette will be created to replace it.
*
* \param surface the SDL_Surface structure to update.
* \returns a new SDL_Palette structure on success or NULL on failure (e.g. if the surface didn't have an index format); call SDL_GetError() for more information.
* \returns a new SDL_Palette structure on success or NULL on failure (e.g. if
* the surface didn't have an index format); call SDL_GetError() for
* more information.
*
* \since This function is available since SDL 3.0.0.
*