author  Philipp Wiesemann <philipp.wiesemann@arcor.de> 
Tue, 25 Nov 2014 22:37:12 +0100  
changeset 9239  4a4293b8a37f 
parent 8149  681eb46b8ac4 
permissions  rwrr 
4929
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

1 
/* 
5535
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

2 
Simple DirectMedia Layer 
8149
681eb46b8ac4
Fixed bug 2374  Update copyright for 2014...
Sam Lantinga <slouken@libsdl.org>
parents:
7502
diff
changeset

3 
Copyright (C) 19972014 Sam Lantinga <slouken@libsdl.org> 
4929
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

4 

5535
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

5 
This software is provided 'asis', without any express or implied 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

6 
warranty. In no event will the authors be held liable for any damages 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

7 
arising from the use of this software. 
4929
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

8 

5535
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

9 
Permission is granted to anyone to use this software for any purpose, 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

10 
including commercial applications, and to alter it and redistribute it 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

11 
freely, subject to the following restrictions: 
4929
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

12 

5535
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

13 
1. The origin of this software must not be misrepresented; you must not 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

14 
claim that you wrote the original software. If you use this software 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

15 
in a product, an acknowledgment in the product documentation would be 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

16 
appreciated but is not required. 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

17 
2. Altered source versions must be plainly marked as such, and must not be 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

18 
misrepresented as being the original software. 
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5262
diff
changeset

19 
3. This notice may not be removed or altered from any source distribution. 
4929
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

20 
*/ 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

21 

aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

22 
/** 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

23 
* \file SDL_blendmode.h 
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
6885
diff
changeset

24 
* 
4929
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

25 
* Header file declaring the SDL_BlendMode enumeration 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

26 
*/ 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

27 

aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

28 
#ifndef _SDL_blendmode_h 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

29 
#define _SDL_blendmode_h 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

30 

aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

31 
#include "begin_code.h" 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

32 
/* Set up for C function definitions, even when using C++ */ 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

33 
#ifdef __cplusplus 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

34 
extern "C" { 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

35 
#endif 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

36 

aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

37 
/** 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

38 
* \brief The blend mode used in SDL_RenderCopy() and drawing operations. 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

39 
*/ 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

40 
typedef enum 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

41 
{ 
7502
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7191
diff
changeset

42 
SDL_BLENDMODE_NONE = 0x00000000, /**< no blending 
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7191
diff
changeset

43 
dstRGBA = srcRGBA */ 
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7191
diff
changeset

44 
SDL_BLENDMODE_BLEND = 0x00000001, /**< alpha blending 
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7191
diff
changeset

45 
dstRGB = (srcRGB * srcA) + (dstRGB * (1srcA)) 
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7191
diff
changeset

46 
dstA = srcA + (dstA * (1srcA)) */ 
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7191
diff
changeset

47 
SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending 
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7191
diff
changeset

48 
dstRGB = (srcRGB * srcA) + dstRGB 
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7191
diff
changeset

49 
dstA = dstA */ 
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7191
diff
changeset

50 
SDL_BLENDMODE_MOD = 0x00000004 /**< color modulate 
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7191
diff
changeset

51 
dstRGB = srcRGB * dstRGB 
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7191
diff
changeset

52 
dstA = dstA */ 
4929
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

53 
} SDL_BlendMode; 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

54 

aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

55 
/* Ends C function definitions when using C++ */ 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

56 
#ifdef __cplusplus 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

57 
} 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

58 
#endif 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

59 
#include "close_code.h" 
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

60 

9239
4a4293b8a37f
Corrected header file guard comments.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents:
8149
diff
changeset

61 
#endif /* _SDL_blendmode_h */ 
4929
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

62 

aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset

63 
/* vi: set ts=4 sw=4 expandtab: */ 