Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5131 clevermous 1
2
>
3
>
4
>SDL_MapRGBA
5
>
6
NAME="GENERATOR"
7
CONTENT="Modular DocBook HTML Stylesheet Version 1.64
8
">
9
REL="HOME"
10
TITLE="SDL Library Documentation"
11
HREF="index.html">
12
REL="UP"
13
TITLE="Video"
14
HREF="video.html">
15
REL="PREVIOUS"
16
TITLE="SDL_MapRGB"
17
HREF="sdlmaprgb.html">
18
REL="NEXT"
19
TITLE="SDL_GetRGB"
20
HREF="sdlgetrgb.html">
21
>
22
CLASS="REFENTRY"
23
BGCOLOR="#FFF8DC"
24
TEXT="#000000"
25
LINK="#0000ee"
26
VLINK="#551a8b"
27
ALINK="#ff0000"
28
>
29
CLASS="NAVHEADER"
30
>
31
WIDTH="100%"
32
BORDER="0"
33
CELLPADDING="0"
34
CELLSPACING="0"
35
>
36
>
37
COLSPAN="3"
38
ALIGN="center"
39
>SDL Library Documentation
40
>
41
>
42
>
43
WIDTH="10%"
44
ALIGN="left"
45
VALIGN="bottom"
46
>
47
HREF="sdlmaprgb.html"
48
>Prev
49
>
50
>
51
WIDTH="80%"
52
ALIGN="center"
53
VALIGN="bottom"
54
>
55
>
56
WIDTH="10%"
57
ALIGN="right"
58
VALIGN="bottom"
59
>
60
HREF="sdlgetrgb.html"
61
>Next
62
>
63
>
64
>
65
>
66
ALIGN="LEFT"
67
WIDTH="100%">
68
>
69
>
70
NAME="SDLMAPRGBA"
71
>SDL_MapRGBA
72
>
73
>
74
CLASS="REFNAMEDIV"
75
>
76
NAME="AEN1272"
77
>
78
>
79
>Name
80
>SDL_MapRGBA -- Map a RGBA color value to a pixel format.
81
>
82
CLASS="REFSYNOPSISDIV"
83
>
84
NAME="AEN1275"
85
>
86
>
87
>Synopsis
88
>
89
CLASS="FUNCSYNOPSIS"
90
>
91
NAME="AEN1276"
92
>
93
>
94
>
95
>
96
CLASS="FUNCSYNOPSISINFO"
97
>#include "SDL.h"
98
>
99
>
100
>
101
CLASS="FUNCDEF"
102
>Uint32 
103
CLASS="FSFUNC"
104
>SDL_MapRGBA
105
>
106
>(SDL_PixelFormat *fmt, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
107
>
108
>
109
>
110
>
111
>
112
>
113
CLASS="REFSECT1"
114
>
115
NAME="AEN1282"
116
>
117
>
118
>Description
119
>
120
>Maps the RGBA color value to the specified pixel format and returns the
121
pixel value as a 32-bit int.
122
>
123
>If the format has a palette (8-bit) the index of the closest matching
124
color in the palette will be returned.
125
>
126
>If the specified pixel format has no alpha component the alpha value
127
will be ignored (as it will be in formats with a palette).
128
>
129
>
130
CLASS="REFSECT1"
131
>
132
NAME="AEN1287"
133
>
134
>
135
>Return Value
136
>
137
>A pixel value best approximating the given RGBA color value for a given
138
pixel format. If the pixel format bpp (color depth) is less than 32-bpp
139
then the unused upper bits of the return value can safely be ignored
140
(e.g., with a 16-bpp format the return value can be assigned to a
141
142
CLASS="TYPE"
143
>Uint16
144
>, and similarly a 
145
CLASS="TYPE"
146
>Uint8
147
> for an 8-bpp
148
format).
149
>
150
>
151
CLASS="REFSECT1"
152
>
153
NAME="AEN1292"
154
>
155
>
156
>See Also
157
>
158
>
159
HREF="sdlgetrgb.html"
160
>SDL_GetRGB
161
>,
162
163
HREF="sdlgetrgba.html"
164
>SDL_GetRGBA
165
>,
166
167
HREF="sdlmaprgb.html"
168
>SDL_MapRGB
169
>,
170
171
HREF="sdlpixelformat.html"
172
>SDL_PixelFormat
173
>
174
>
175
>
176
CLASS="NAVFOOTER"
177
>
178
ALIGN="LEFT"
179
WIDTH="100%">
180
WIDTH="100%"
181
BORDER="0"
182
CELLPADDING="0"
183
CELLSPACING="0"
184
>
185
>
186
WIDTH="33%"
187
ALIGN="left"
188
VALIGN="top"
189
>
190
HREF="sdlmaprgb.html"
191
>Prev
192
>
193
>
194
WIDTH="34%"
195
ALIGN="center"
196
VALIGN="top"
197
>
198
HREF="index.html"
199
>Home
200
>
201
>
202
WIDTH="33%"
203
ALIGN="right"
204
VALIGN="top"
205
>
206
HREF="sdlgetrgb.html"
207
>Next
208
>
209
>
210
>
211
>
212
WIDTH="33%"
213
ALIGN="left"
214
VALIGN="top"
215
>SDL_MapRGB
216
>
217
WIDTH="34%"
218
ALIGN="center"
219
VALIGN="top"
220
>
221
HREF="video.html"
222
>Up
223
>
224
>
225
WIDTH="33%"
226
ALIGN="right"
227
VALIGN="top"
228
>SDL_GetRGB
229
>
230
>
231
>
232
>
233
>
234
>