Penguin
Blame: SDL_SetAlpha(3)
EditPageHistoryDiffInfoLikePages
Annotated edit history of SDL_SetAlpha(3) version 2, including all changes. View license author blame.
Rev Author # Line
2 perry 1 SDL_!SetAlpha
2 !!!SDL_!SetAlpha
1 perry 3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 SEE ALSO
7 ----
8 !!NAME
9
10
2 perry 11 SDL_!SetAlpha- Adjust the alpha properties of a surface
1 perry 12 !!SYNOPSIS
13
14
15 __#include __
16
17
2 perry 18 __int SDL_!SetAlpha__(__SDL_Surface *surface, Uint32
1 perry 19 flag, Uint8 alpha__);
20 !!DESCRIPTION
21
22
23 __Note:__
24
25
26 This function and the semantics of SDL alpha blending have
27 changed since version 1.1.4. Up until version 1.1.5, an
28 alpha value of 0 was considered opaque and a value of 255
29 was considered transparent. This has now been inverted: 0
30 (__SDL_ALPHA_TRANSPARENT__) is now considered transparent
31 and 255 (__SDL_ALPHA_OPAQUE__) is now considered
32 opaque.
33
34
2 perry 35 __SDL_!SetAlpha__ is used for setting the per-surface
1 perry 36 alpha and/or enabling and disabling per-pixel alpha
37 blending.
38
39
40 The __surface__ parameter specifies which surface whose
41 alpha attributes you wish to adjust. __flags__ is used to
42 specify whether alpha blending should be used
43 (__SDL_SRCALPHA__) and whether the surface should use RLE
44 acceleration for blitting (__SDL_RLEACCEL__).
45 __flags__ can be an OR'd combination of these two
46 options, one of these options or 0. If __SDL_SRCALPHA__
47 is not passed as a flag then all alpha information is
48 ignored when blitting the surface. The __alpha__
49 parameter is the per-surface alpha value, a surface need not
50 have an alpha channel to use per-surface alpha and blitting
51 can still be accelerated with __SDL_RLEACCEL__. Setting
52 the per-surface alpha value to 0 disables per-surface alpha
53 blending.
54
55
56 __Note:__
57
58
59 The per-surface alpha value of 128 is considered a special
60 case and is optimised, so it's much faster than other
61 per-surface values.
62
63
64 Alpha effects surface blitting in the following
65 ways:
66
67
68 RGBA-SDL_SRCALPHA__
69
70
71 The source is alpha-blended with the destination, using the
72 alpha channel. __SDL_SRCCOLORKEY__ and the per-surface
73 alpha are ignored.
74
75
76 RGBA-SDL_SRCALPHA__
77
78
79 The RGB data is copied from the source. The source alpha
80 channel and the per-surface alpha value are
81 ignored.
82
83
84 RGB-SDL_SRCALPHA__
85
86
87 The source is alpha-blended with the destination using the
88 per-surface alpha value. If
89 __SDL_SRCCOLORKEY__literal
90 __
91
92
93 RGB-SDL_SRCALPHA__
94
95
96 The RGB data is copied from the source and the destination
97 alpha is zero to opaque. If __SDL_SRCCOLORKEY__ is set,
98 only the pixels not matching the colorkey value are
99 copied.
100
101
102 RGBA-SDL_SRCALPHA__
103
104
105 The source is alpha-blended with the destination using the
106 source alpha channel. The alpha channel in the destination
107 surface is left untouched. __SDL_SRCCOLORKEY__ is
108 ignored.
109
110
111 RGBA-SDL_SRCALPHA__
112
113
114 The RGBA data is copied to the destination surface. If
115 __SDL_SRCCOLORKEY__ is set, only the pixels not matching
116 the colorkey value are copied.
117
118
119 RGB-SDL_SRCALPHA__
120
121
122 The source is alpha-blended with the destination using the
123 per-surface alpha value. If __SDL_SRCCOLORKEY__ is set,
124 only the pixels not matching the colorkey value are
125 copied.
126
127
128 RGB-SDL_SRCALPHA__
129
130
131 The RGB data is copied from the source. If
132 __SDL_SRCCOLORKEY__ is set, only the pixels not matching
133 the colorkey value are copied.
134 !!SEE ALSO
135
136
137 __SDL_MapRGBA__, __SDL_GetRGBA__,
2 perry 138 __SDL_!DisplayFormatAlpha__,
139 __SDL_!BlitSurface__
1 perry 140 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.