mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 09:48:26 +00:00
Sync wiki -> headers.
This commit is contained in:
parent
01cba48d18
commit
197340ea1c
18 changed files with 291 additions and 273 deletions
|
@ -224,8 +224,8 @@ extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface *surface);
|
|||
/**
|
||||
* Load a BMP image from a seekable SDL data stream.
|
||||
*
|
||||
* The new surface should be freed with SDL_DestroySurface(). Not doing so will
|
||||
* result in a memory leak.
|
||||
* The new surface should be freed with SDL_DestroySurface(). Not doing so
|
||||
* will result in a memory leak.
|
||||
*
|
||||
* src is an open SDL_RWops buffer, typically loaded with SDL_RWFromFile.
|
||||
* Alternitavely, you might also use the macro SDL_LoadBMP to load a bitmap
|
||||
|
@ -652,8 +652,8 @@ extern DECLSPEC int SDLCALL SDL_PremultiplyAlpha(int width, int height,
|
|||
* information, no blending takes place.
|
||||
*
|
||||
* If there is a clip rectangle set on the destination (set via
|
||||
* SDL_SetSurfaceClipRect()), then this function will fill based on the intersection
|
||||
* of the clip rectangle and `rect`.
|
||||
* SDL_SetSurfaceClipRect()), then this function will fill based on the
|
||||
* intersection of the clip rectangle and `rect`.
|
||||
*
|
||||
* \param dst the SDL_Surface structure that is the drawing target
|
||||
* \param rect the SDL_Rect structure representing the rectangle to fill, or
|
||||
|
@ -678,8 +678,8 @@ extern DECLSPEC int SDLCALL SDL_FillSurfaceRect
|
|||
* information, no blending takes place.
|
||||
*
|
||||
* If there is a clip rectangle set on the destination (set via
|
||||
* SDL_SetSurfaceClipRect()), then this function will fill based on the intersection
|
||||
* of the clip rectangle and `rect`.
|
||||
* SDL_SetSurfaceClipRect()), then this function will fill based on the
|
||||
* intersection of the clip rectangle and `rect`.
|
||||
*
|
||||
* \param dst the SDL_Surface structure that is the drawing target
|
||||
* \param rects an array of SDL_Rects representing the rectangles to fill.
|
||||
|
@ -696,56 +696,57 @@ extern DECLSPEC int SDLCALL SDL_FillSurfaceRects
|
|||
(SDL_Surface *dst, const SDL_Rect *rects, int count, Uint32 color);
|
||||
|
||||
/**
|
||||
* Performs a fast blit from the source surface to the destination surface.
|
||||
* Performs a fast blit from the source surface to the destination surface.
|
||||
*
|
||||
* This assumes that the source and destination rectangles are
|
||||
* the same size. If either \c srcrect or \c dstrect are NULL, the entire
|
||||
* surface (\c src or \c dst) is copied. The final blit rectangles are saved
|
||||
* in \c srcrect and \c dstrect after all clipping is performed.
|
||||
* This assumes that the source and destination rectangles are the same size.
|
||||
* If either `srcrect` or `dstrect` are NULL, the entire surface (`src` or
|
||||
* `dst`) is copied. The final blit rectangles are saved in `srcrect` and
|
||||
* `dstrect` after all clipping is performed.
|
||||
*
|
||||
* The blit function should not be called on a locked surface.
|
||||
* The blit function should not be called on a locked surface.
|
||||
*
|
||||
* The blit semantics for surfaces with and without blending and colorkey
|
||||
* are defined as follows:
|
||||
* \verbatim
|
||||
RGBA->RGB:
|
||||
Source surface blend mode set to SDL_BLENDMODE_BLEND:
|
||||
alpha-blend (using the source alpha-channel and per-surface alpha)
|
||||
SDL_SRCCOLORKEY ignored.
|
||||
Source surface blend mode set to SDL_BLENDMODE_NONE:
|
||||
copy RGB.
|
||||
if SDL_SRCCOLORKEY set, only copy the pixels matching the
|
||||
RGB values of the source color key, ignoring alpha in the
|
||||
comparison.
|
||||
|
||||
RGB->RGBA:
|
||||
Source surface blend mode set to SDL_BLENDMODE_BLEND:
|
||||
alpha-blend (using the source per-surface alpha)
|
||||
Source surface blend mode set to SDL_BLENDMODE_NONE:
|
||||
copy RGB, set destination alpha to source per-surface alpha value.
|
||||
both:
|
||||
if SDL_SRCCOLORKEY set, only copy the pixels matching the
|
||||
source color key.
|
||||
|
||||
RGBA->RGBA:
|
||||
Source surface blend mode set to SDL_BLENDMODE_BLEND:
|
||||
alpha-blend (using the source alpha-channel and per-surface alpha)
|
||||
SDL_SRCCOLORKEY ignored.
|
||||
Source surface blend mode set to SDL_BLENDMODE_NONE:
|
||||
copy all of RGBA to the destination.
|
||||
if SDL_SRCCOLORKEY set, only copy the pixels matching the
|
||||
RGB values of the source color key, ignoring alpha in the
|
||||
comparison.
|
||||
|
||||
RGB->RGB:
|
||||
Source surface blend mode set to SDL_BLENDMODE_BLEND:
|
||||
alpha-blend (using the source per-surface alpha)
|
||||
Source surface blend mode set to SDL_BLENDMODE_NONE:
|
||||
copy RGB.
|
||||
both:
|
||||
if SDL_SRCCOLORKEY set, only copy the pixels matching the
|
||||
source color key.
|
||||
\endverbatim
|
||||
* The blit semantics for surfaces with and without blending and colorkey are
|
||||
* defined as follows:
|
||||
*
|
||||
* ```c
|
||||
* RGBA->RGB:
|
||||
* Source surface blend mode set to SDL_BLENDMODE_BLEND:
|
||||
* alpha-blend (using the source alpha-channel and per-surface alpha)
|
||||
* SDL_SRCCOLORKEY ignored.
|
||||
* Source surface blend mode set to SDL_BLENDMODE_NONE:
|
||||
* copy RGB.
|
||||
* if SDL_SRCCOLORKEY set, only copy the pixels matching the
|
||||
* RGB values of the source color key, ignoring alpha in the
|
||||
* comparison.
|
||||
*
|
||||
* RGB->RGBA:
|
||||
* Source surface blend mode set to SDL_BLENDMODE_BLEND:
|
||||
* alpha-blend (using the source per-surface alpha)
|
||||
* Source surface blend mode set to SDL_BLENDMODE_NONE:
|
||||
* copy RGB, set destination alpha to source per-surface alpha value.
|
||||
* both:
|
||||
* if SDL_SRCCOLORKEY set, only copy the pixels matching the
|
||||
* source color key.
|
||||
*
|
||||
* RGBA->RGBA:
|
||||
* Source surface blend mode set to SDL_BLENDMODE_BLEND:
|
||||
* alpha-blend (using the source alpha-channel and per-surface alpha)
|
||||
* SDL_SRCCOLORKEY ignored.
|
||||
* Source surface blend mode set to SDL_BLENDMODE_NONE:
|
||||
* copy all of RGBA to the destination.
|
||||
* if SDL_SRCCOLORKEY set, only copy the pixels matching the
|
||||
* RGB values of the source color key, ignoring alpha in the
|
||||
* comparison.
|
||||
*
|
||||
* RGB->RGB:
|
||||
* Source surface blend mode set to SDL_BLENDMODE_BLEND:
|
||||
* alpha-blend (using the source per-surface alpha)
|
||||
* Source surface blend mode set to SDL_BLENDMODE_NONE:
|
||||
* copy RGB.
|
||||
* both:
|
||||
* if SDL_SRCCOLORKEY set, only copy the pixels matching the
|
||||
* source color key.
|
||||
* ```
|
||||
*
|
||||
* \param src the SDL_Surface structure to be copied from
|
||||
* \param srcrect the SDL_Rect structure representing the rectangle to be
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue