SDL_gfx
2.0.25
|
#include "SDL_gfxBlitFunc.h"
Go to the source code of this file.
Functions | |
void | _SDL_gfxBlitBlitterRGBA (SDL_gfxBlitInfo *info) |
Internal blitter using adjusted destination alpha during RGBA->RGBA blits. | |
int | _SDL_gfxBlitRGBACall (SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect) |
Internal blitter setup wrapper for RGBA->RGBA blits. | |
int | SDL_gfxBlitRGBA (SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect) |
Blitter for RGBA->RGBA blits with alpha adjustment. | |
int | SDL_gfxSetAlpha (SDL_Surface *src, Uint8 a) |
Sets the alpha channel in a 32 bit surface. | |
int | SDL_gfxMultiplyAlpha (SDL_Surface *src, Uint8 a) |
Multiply the alpha channel in a 32bit surface. | |
Variables | |
const unsigned int | GFX_ALPHA_ADJUST_ARRAY [256] |
Alpha adjustment table for custom blitter. |
void _SDL_gfxBlitBlitterRGBA | ( | SDL_gfxBlitInfo * | info | ) |
Internal blitter using adjusted destination alpha during RGBA->RGBA blits.
Performs the blit based on the 'info' structure and applies the transfer function to the destination 'a' values.
info | The blit info to use. |
Definition at line 306 of file SDL_gfxBlitFunc.c.
int _SDL_gfxBlitRGBACall | ( | SDL_Surface * | src, |
SDL_Rect * | srcrect, | ||
SDL_Surface * | dst, | ||
SDL_Rect * | dstrect | ||
) |
Internal blitter setup wrapper for RGBA->RGBA blits.
Sets up the blitter info based on the 'src' and 'dst' surfaces and rectangles.
src | The source surface. |
srcrect | The source rectangle. |
dst | The destination surface. |
dstrect | The destination rectangle. |
Definition at line 356 of file SDL_gfxBlitFunc.c.
int SDL_gfxBlitRGBA | ( | SDL_Surface * | src, |
SDL_Rect * | srcrect, | ||
SDL_Surface * | dst, | ||
SDL_Rect * | dstrect | ||
) |
Blitter for RGBA->RGBA blits with alpha adjustment.
Verifies the input 'src' and 'dst' surfaces and rectangles and performs blit. The destination clip rectangle is honored.
src | The source surface. |
srcrect | The source rectangle. |
dst | The destination surface. |
dstrect | The destination rectangle. |
Definition at line 411 of file SDL_gfxBlitFunc.c.
int SDL_gfxMultiplyAlpha | ( | SDL_Surface * | src, |
Uint8 | a | ||
) |
Multiply the alpha channel in a 32bit surface.
Helper function that multiplies the alpha channel in a 32 bit surface with a constant value. The final alpha is always scaled to the range 0-255 (i.e. the factor is a/256).
Only 32 bit surfaces can be used with this function.
src | Pointer to the target surface to change. |
a | The alpha value to multiply with. When a is 255, this function is a NoOp. |
Definition at line 587 of file SDL_gfxBlitFunc.c.
int SDL_gfxSetAlpha | ( | SDL_Surface * | src, |
Uint8 | a | ||
) |
Sets the alpha channel in a 32 bit surface.
Helper function that sets the alpha channel in a 32 bit surface to a constant value. Only 32 bit surfaces can be used with this function.
src | Pointer to the target surface to change. |
a | The alpha value to set. |
Definition at line 524 of file SDL_gfxBlitFunc.c.
const unsigned int GFX_ALPHA_ADJUST_ARRAY[256] |
Alpha adjustment table for custom blitter.
The table provides values for a modified, non-linear transfer function which maintain brightness.
Definition at line 39 of file SDL_gfxBlitFunc.c.