Sync SDL2 wiki -> header

[ci skip]
This commit is contained in:
SDL Wiki Bot committed 2024-10-20 01:02:07 +00:00
1 parent 1af0b39833
commit bcf1397e33
1 file changed
+40 -37
+40 -37
View File
@@ -806,52 +806,55 @@ extern DECLSPEC int SDLCALL SDL_FillRects
/** /**
* 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 is defined as a macro to SDL_UpperBlit to be less confusing.This * This assumes that the source and destination rectangles are the same size.
* assumes that the source and destination rectangles are the same size. If * If either `srcrect` or `dstrect` are NULL, the entire surface (`src` or
* either `srcrect` or `dstrect` are NULL, the entire surface (`src` or `dst`) * `dst`) is copied. The final blit rectangles are saved in `srcrect` and
* is copied. The final blit rectangles are saved in `srcrect` and `dstrect` * `dstrect` after all clipping is performed.
* 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 * The blit semantics for surfaces with and without blending and colorkey are
* defined as follows: * defined as follows:
* *
* RGBA to RGB: * ```
* 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.
* *
* - Source surface blend mode set to SDL_BLENDMODE_BLEND: * alpha-blend * RGB->RGBA:
* (using the source alpha-channel and per-surface alpha) SDL_SRCCOLORKEY * Source surface blend mode set to SDL_BLENDMODE_BLEND:
* ignored. * alpha-blend (using the source per-surface alpha)
* - Source surface blend mode set to SDL_BLENDMODE_NONE: * copy RGB. * if * Source surface blend mode set to SDL_BLENDMODE_NONE:
* SDL_SRCCOLORKEY set, only copy the pixels matching the RGB values of the * copy RGB, set destination alpha to source per-surface alpha value.
* source color key, ignoring alpha in the comparison. * both:
* if SDL_SRCCOLORKEY set, only copy the pixels matching the
* source color key.
* *
* RGB to RGBA: * 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.
* *
* - Source surface blend mode set to SDL_BLENDMODE_BLEND: * alpha-blend * RGB->RGB:
* (using the source per-surface alpha) * Source surface blend mode set to SDL_BLENDMODE_BLEND:
* - Source surface blend mode set to SDL_BLENDMODE_NONE: * copy RGB, set * alpha-blend (using the source per-surface alpha)
* destination alpha to source per-surface alpha value. * Source surface blend mode set to SDL_BLENDMODE_NONE:
* - both: * if SDL_SRCCOLORKEY set, only copy the pixels matching the source * copy RGB.
* color key. * both:
* * if SDL_SRCCOLORKEY set, only copy the pixels matching the
* RGBA to RGBA: * source color key.
* * ```
* - 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 to 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.
* *
* You should call SDL_BlitSurface() unless you know exactly how SDL blitting * You should call SDL_BlitSurface() unless you know exactly how SDL blitting
* works internally and how to use the other blit functions. * works internally and how to use the other blit functions.