Lines Matching refs:colors

133 		(format->palette)->colors = (SDL_Color *)SDL_malloc(
135 if ( (format->palette)->colors == NULL ) {
190 format->palette->colors[i].r=r;
194 format->palette->colors[i].g=g;
198 format->palette->colors[i].b=b;
203 format->palette->colors[i].unused=a;
205 format->palette->colors[i].unused=0;
210 format->palette->colors[0].r = 0xFF;
211 format->palette->colors[0].g = 0xFF;
212 format->palette->colors[0].b = 0xFF;
213 format->palette->colors[1].r = 0x00;
214 format->palette->colors[1].g = 0x00;
215 format->palette->colors[1].b = 0x00;
218 SDL_memset((format->palette)->colors, 0,
255 if ( format->palette->colors ) {
256 SDL_free(format->palette->colors);
264 * Calculate an 8-bit (3 red, 3 green, 2 blue) dithered palette of colors
266 void SDL_DitherColors(SDL_Color *colors, int bpp)
278 colors[i].r = r;
281 colors[i].g = g;
285 colors[i].b = b;
324 rd = pal->colors[i].r - r;
325 gd = pal->colors[i].g - g;
326 bd = pal->colors[i].b - b;
396 *r = fmt->palette->colors[pixel].r;
397 *g = fmt->palette->colors[pixel].g;
398 *b = fmt->palette->colors[pixel].b;
416 *r = fmt->palette->colors[pixel].r;
417 *g = fmt->palette->colors[pixel].g;
418 *b = fmt->palette->colors[pixel].b;
422 /* Apply gamma to a set of colors - this is easy. :) */
423 void SDL_ApplyGamma(Uint16 *gamma, SDL_Color *colors, SDL_Color *output,
429 output[i].r = gamma[0*256 + colors[i].r] >> 8;
430 output[i].g = gamma[1*256 + colors[i].g] >> 8;
431 output[i].b = gamma[2*256 + colors[i].b] >> 8;
444 if ( SDL_memcmp(src->colors, dst->colors, src->ncolors*
459 src->colors[i].r, src->colors[i].g, src->colors[i].b);
483 pal->colors[i].r, pal->colors[i].g,
484 pal->colors[i].b, alpha);
493 SDL_Color colors[256];
496 /* SDL_DitherColors does not initialize the 'unused' component of colors,
498 SDL_memset(colors, 0, sizeof(colors));
501 SDL_DitherColors(colors, 8);
502 dithered.colors = colors;