|
SDL3_gfx 1.0.1
Graphics primitives and surface functions for SDL3
|
Go to the source code of this file.
Macros | |
| #define | SDL3_IMAGEFILTER_SCOPE extern |
Functions | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterAdd (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) |
| Filter using Add: D = saturation255(S1 + S2) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterMean (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) |
| Filter using Mean: D = S1/2 + S2/2. | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterSub (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) |
| Filter using Sub: D = saturation0(S1 - S2) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterAbsDiff (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) |
| Filter using AbsDiff: D = | S1 - S2 |. | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterMult (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) |
| Filter using Mult: D = saturation255(S1 * S2) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterMultNor (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) |
| Filter using MultNor: D = S1 * S2. | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterMultDivby2 (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) |
| Filter using MultDivby2: D = saturation255(S1/2 * S2) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterMultDivby4 (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) |
| Filter using MultDivby4: D = saturation255(S1/2 * S2/2) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterBitAnd (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) |
| Filter using BitAnd: D = S1 & S2. | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterBitOr (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) |
| Filter using BitOr: D = S1 | S2. | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterDiv (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) |
| Filter using Div: D = S1 / S2. | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterBitNegation (unsigned char *Src1, unsigned char *Dest, unsigned int length) |
| Filter using BitNegation: D = !S. | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterAddByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C) |
| Filter using AddByte: D = saturation255(S + C) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterAddUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int bpp, unsigned int C) |
| Filter using AddUint: D = saturation255((S[i] + Cs[i % BPP]) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterAddByteToHalf (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C) |
| Filter using AddByteToHalf: D = saturation255(S/2 + C) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterSubByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C) |
| Filter using SubByte: D = saturation0(S - C) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterSubUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int bpp, unsigned int C) |
| Filter using SubUint: D = saturation0(S[i] - Cs[i % BPP]) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterShiftRight (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N) |
| Filter using ShiftRight: D = saturation0(S >> N) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterShiftRightUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N) |
| Filter using ShiftRightUint: D = saturation0((uint)S[i] >> N) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterMultByByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C) |
| Filter using MultByByte: D = saturation255(S * C) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterShiftRightAndMultByByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N, unsigned char C) |
| Filter using ShiftRightAndMultByByte: D = saturation255((S >> N) * C) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterShiftLeftByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N) |
| Filter using ShiftLeftByte: D = (S << N) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterShiftLeftUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N) |
| Filter using ShiftLeftUint: D = ((uint)S << N) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterShiftLeft (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N) |
| Filter ShiftLeft: D = saturation255(S << N) | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterBinarizeUsingThreshold (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char T) |
| Filter using BinarizeUsingThreshold: D = (S >= T) ? 255:0. | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterClipToRange (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char Tmin, unsigned char Tmax) |
| Filter using ClipToRange: D = (S >= Tmin) & (S <= Tmax) S:Tmin | Tmax. | |
| SDL3_IMAGEFILTER_SCOPE int | SDL_imageFilterNormalizeLinear (unsigned char *Src, unsigned char *Dest, unsigned int length, int Cmin, int Cmax, int Nmin, int Nmax) |
| Filter using NormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin) | |
| #define SDL3_IMAGEFILTER_SCOPE extern |
Definition at line 50 of file SDL3_imageFilter.h.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterAbsDiff | ( | unsigned char * | Src1, |
| unsigned char * | Src2, | ||
| unsigned char * | Dest, | ||
| unsigned int | length ) |
Filter using AbsDiff: D = | S1 - S2 |.
| Src1 | Pointer to the start of the first source byte array (S1). |
| Src2 | Pointer to the start of the second source byte array (S2). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source arrays. |
Definition at line 181 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterAdd | ( | unsigned char * | Src1, |
| unsigned char * | Src2, | ||
| unsigned char * | Dest, | ||
| unsigned int | length ) |
Filter using Add: D = saturation255(S1 + S2)
| Src1 | Pointer to the start of the first source byte array (S1). |
| Src2 | Pointer to the start of the second source byte array (S2). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source arrays. |
Definition at line 58 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterAddByte | ( | unsigned char * | Src1, |
| unsigned char * | Dest, | ||
| unsigned int | length, | ||
| unsigned char | C ) |
Filter using AddByte: D = saturation255(S + C)
| Src1 | Pointer to the start of the source byte array (S). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source array. |
| C | Constant value to add (C). |
Definition at line 548 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterAddByteToHalf | ( | unsigned char * | Src1, |
| unsigned char * | Dest, | ||
| unsigned int | length, | ||
| unsigned char | C ) |
Filter using AddByteToHalf: D = saturation255(S/2 + C)
| Src1 | Pointer to the start of the source byte array (S). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source array. |
| C | Constant to add (C). |
Definition at line 652 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterAddUint | ( | unsigned char * | Src1, |
| unsigned char * | Dest, | ||
| unsigned int | length, | ||
| unsigned int | bpp, | ||
| unsigned int | C ) |
Filter using AddUint: D = saturation255((S[i] + Cs[i % BPP])
| Src1 | Pointer to the start of the source byte array (S). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source array. |
| bpp | The bytes per unit length (BPP) |
| C | Constant to add (C). |
Definition at line 597 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterBinarizeUsingThreshold | ( | unsigned char * | Src1, |
| unsigned char * | Dest, | ||
| unsigned int | length, | ||
| unsigned char | T ) |
Filter using BinarizeUsingThreshold: D = (S >= T) ? 255:0.
| Src1 | Pointer to the start of the source byte array (S). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source array. |
| T | The threshold boundary (inclusive). |
Definition at line 1169 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterBitAnd | ( | unsigned char * | Src1, |
| unsigned char * | Src2, | ||
| unsigned char * | Dest, | ||
| unsigned int | length ) |
Filter using BitAnd: D = S1 & S2.
| Src1 | Pointer to the start of the first source byte array (S1). |
| Src2 | Pointer to the start of the second source byte array (S2). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source arrays. |
Definition at line 390 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterBitNegation | ( | unsigned char * | Src1, |
| unsigned char * | Dest, | ||
| unsigned int | length ) |
Filter using BitNegation: D = !S.
| Src1 | Pointer to the start of the source byte array (S). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source array. |
Definition at line 511 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterBitOr | ( | unsigned char * | Src1, |
| unsigned char * | Src2, | ||
| unsigned char * | Dest, | ||
| unsigned int | length ) |
Filter using BitOr: D = S1 | S2.
| Src1 | Pointer to the start of the first source byte array (S1). |
| Src2 | Pointer to the start of the second source byte array (S2). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source arrays. |
Definition at line 429 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterClipToRange | ( | unsigned char * | Src1, |
| unsigned char * | Dest, | ||
| unsigned int | length, | ||
| unsigned char | Tmin, | ||
| unsigned char | Tmax ) |
Filter using ClipToRange: D = (S >= Tmin) & (S <= Tmax) S:Tmin | Tmax.
| Src1 | Pointer to the start of the source byte array (S). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source array. |
| Tmin | Lower (inclusive) boundary of the clipping range. |
| Tmax | Upper (inclusive) boundary of the clipping range. |
Definition at line 1214 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterDiv | ( | unsigned char * | Src1, |
| unsigned char * | Src2, | ||
| unsigned char * | Dest, | ||
| unsigned int | length ) |
Filter using Div: D = S1 / S2.
| Src1 | Pointer to the start of the first source byte array (S1). |
| Src2 | Pointer to the start of the second source byte array (S2). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source arrays. |
Definition at line 468 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterMean | ( | unsigned char * | Src1, |
| unsigned char * | Src2, | ||
| unsigned char * | Dest, | ||
| unsigned int | length ) |
Filter using Mean: D = S1/2 + S2/2.
| Src1 | Pointer to the start of the first source byte array (S1). |
| Src2 | Pointer to the start of the second source byte array (S2). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source arrays. |
Definition at line 101 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterMult | ( | unsigned char * | Src1, |
| unsigned char * | Src2, | ||
| unsigned char * | Dest, | ||
| unsigned int | length ) |
Filter using Mult: D = saturation255(S1 * S2)
| Src1 | Pointer to the start of the first source byte array (S1). |
| Src2 | Pointer to the start of the second source byte array (S2). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source arrays. |
Definition at line 222 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterMultByByte | ( | unsigned char * | Src1, |
| unsigned char * | Dest, | ||
| unsigned int | length, | ||
| unsigned char | C ) |
Filter using MultByByte: D = saturation255(S * C)
| Src1 | Pointer to the start of the source byte array (S). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source arrays. |
| C | Constant to multiply with (C). |
Definition at line 907 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterMultDivby2 | ( | unsigned char * | Src1, |
| unsigned char * | Src2, | ||
| unsigned char * | Dest, | ||
| unsigned int | length ) |
Filter using MultDivby2: D = saturation255(S1/2 * S2)
| Src1 | Pointer to the start of the first source byte array (S1). |
| Src2 | Pointer to the start of the second source byte array (S2). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source arrays. |
Definition at line 304 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterMultDivby4 | ( | unsigned char * | Src1, |
| unsigned char * | Src2, | ||
| unsigned char * | Dest, | ||
| unsigned int | length ) |
Filter using MultDivby4: D = saturation255(S1/2 * S2/2)
| Src1 | Pointer to the start of the first source byte array (S1). |
| Src2 | Pointer to the start of the second source byte array (S2). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source arrays. |
Definition at line 347 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterMultNor | ( | unsigned char * | Src1, |
| unsigned char * | Src2, | ||
| unsigned char * | Dest, | ||
| unsigned int | length ) |
Filter using MultNor: D = S1 * S2.
| Src1 | Pointer to the start of the first source byte array (S1). |
| Src2 | Pointer to the start of the second source byte array (S2). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source arrays. |
Definition at line 265 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterNormalizeLinear | ( | unsigned char * | Src, |
| unsigned char * | Dest, | ||
| unsigned int | length, | ||
| int | Cmin, | ||
| int | Cmax, | ||
| int | Nmin, | ||
| int | Nmax ) |
Filter using NormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin)
| Src | Pointer to the start of the source byte array (S). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source array. |
| Cmin | Normalization constant. |
| Cmax | Normalization constant. |
| Nmin | Normalization constant. |
| Nmax | Normalization constant. |
Definition at line 1268 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeft | ( | unsigned char * | Src1, |
| unsigned char * | Dest, | ||
| unsigned int | length, | ||
| unsigned char | N ) |
Filter ShiftLeft: D = saturation255(S << N)
| Src1 | Pointer to the start of the source byte array (S1). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source array. |
| N | Number of bit-positions to shift (N). Valid range is 0 to 8. |
Definition at line 1118 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeftByte | ( | unsigned char * | Src1, |
| unsigned char * | Dest, | ||
| unsigned int | length, | ||
| unsigned char | N ) |
Filter using ShiftLeftByte: D = (S << N)
| Src1 | Pointer to the start of the source byte array (S). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source arrays. |
| N | Number of bit-positions to shift (N). Valid range is 0 to 8. |
Definition at line 1014 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeftUint | ( | unsigned char * | Src1, |
| unsigned char * | Dest, | ||
| unsigned int | length, | ||
| unsigned char | N ) |
Filter using ShiftLeftUint: D = ((uint)S << N)
| Src1 | Pointer to the start of the source byte array (S). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source array. |
| N | Number of bit-positions to shift (N). Valid range is 0 to 32. |
Definition at line 1064 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRight | ( | unsigned char * | Src1, |
| unsigned char * | Dest, | ||
| unsigned int | length, | ||
| unsigned char | N ) |
Filter using ShiftRight: D = saturation0(S >> N)
| Src1 | Pointer to the start of the source byte array (S). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source array. |
| N | Number of bit-positions to shift (N). Valid range is 0 to 8. |
Definition at line 803 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRightAndMultByByte | ( | unsigned char * | Src1, |
| unsigned char * | Dest, | ||
| unsigned int | length, | ||
| unsigned char | N, | ||
| unsigned char | C ) |
Filter using ShiftRightAndMultByByte: D = saturation255((S >> N) * C)
| Src1 | Pointer to the start of the source byte array (S). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source array. |
| N | Number of bit-positions to shift (N). Valid range is 0 to 8. |
| C | Constant to multiply with (C). |
Definition at line 958 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRightUint | ( | unsigned char * | Src1, |
| unsigned char * | Dest, | ||
| unsigned int | length, | ||
| unsigned char | N ) |
Filter using ShiftRightUint: D = saturation0((uint)S[i] >> N)
| Src1 | Pointer to the start of the source byte array (S1). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source array. |
| N | Number of bit-positions to shift (N). Valid range is 0 to 32. |
Definition at line 853 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterSub | ( | unsigned char * | Src1, |
| unsigned char * | Src2, | ||
| unsigned char * | Dest, | ||
| unsigned int | length ) |
Filter using Sub: D = saturation0(S1 - S2)
| Src1 | Pointer to the start of the first source byte array (S1). |
| Src2 | Pointer to the start of the second source byte array (S2). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source arrays. |
Definition at line 143 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterSubByte | ( | unsigned char * | Src1, |
| unsigned char * | Dest, | ||
| unsigned int | length, | ||
| unsigned char | C ) |
Filter using SubByte: D = saturation0(S - C)
| Src1 | Pointer to the start of the source byte array (S). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source arrays. |
| C | Constant to subtract (C). |
Definition at line 697 of file SDL3_imageFilter.c.
| SDL3_IMAGEFILTER_SCOPE int SDL_imageFilterSubUint | ( | unsigned char * | Src1, |
| unsigned char * | Dest, | ||
| unsigned int | length, | ||
| unsigned int | bpp, | ||
| unsigned int | C ) |
Filter using SubUint: D = saturation0(S[i] - Cs[i % BPP])
| Src1 | Pointer to the start of the source byte array (S1). |
| Dest | Pointer to the start of the destination byte array (D). |
| length | The number of bytes in the source array. |
| bpp | The bytes per unit length (BPP) |
| C | Constant to subtract (C). |
Definition at line 747 of file SDL3_imageFilter.c.