Lines Matching refs:format
95 depth = screen->format->BitsPerPixel;
96 Rmask = screen->format->Rmask;
97 Gmask = screen->format->Gmask;
98 Bmask = screen->format->Bmask;
99 Amask = screen->format->Amask;
102 surface->format = SDL_AllocFormat(depth, Rmask, Gmask, Bmask, Amask);
103 if ( surface->format == NULL ) {
190 (key == surface->format->colorkey) ) {
205 surface->format->colorkey = key;
219 surface->format->colorkey = 0;
228 Uint32 oldalpha = surface->format->alpha;
255 surface->format->alpha = value;
269 surface->format->alpha = SDL_ALPHA_OPAQUE;
289 if ( (surface->format->Amask != 0xFF000000) &&
290 (surface->format->Amask != 0x000000FF) ) {
291 SDL_SetError("Unsupported surface alpha mask format");
296 if ( surface->format->Amask == 0xFF000000 ) {
302 if ( surface->format->Amask == 0xFF000000 ) {
561 if ( dst->format->BitsPerPixel < 8 ) {
562 switch(dst->format->BitsPerPixel) {
570 SDL_SetError("Fill rect on unsupported surface format");
604 dstrect->x*dst->format->BytesPerPixel;
605 if ( dst->format->palette || (color == 0) ) {
606 x = dstrect->w*dst->format->BytesPerPixel;
686 switch (dst->format->BytesPerPixel) {
789 * Convert a surface into the specified pixel format.
792 SDL_PixelFormat *format, Uint32 flags)
801 if ( format->palette != NULL ) {
803 for ( i=0; i<format->palette->ncolors; ++i ) {
804 if ( (format->palette->colors[i].r != 0) ||
805 (format->palette->colors[i].g != 0) ||
806 (format->palette->colors[i].b != 0) )
809 if ( i == format->palette->ncolors ) {
817 if(format->Amask != 0 && (flags & SDL_HWSURFACE)) {
823 /* Create a new surface with the desired format */
825 surface->w, surface->h, format->BitsPerPixel,
826 format->Rmask, format->Gmask, format->Bmask, format->Amask);
832 if ( format->palette && convert->format->palette ) {
833 SDL_memcpy(convert->format->palette->colors,
834 format->palette->colors,
835 format->palette->ncolors*sizeof(SDL_Color));
836 convert->format->palette->ncolors = format->palette->ncolors;
844 && format->Amask) {
847 colorkey = surface->format->colorkey;
853 if ( format->Amask ) {
856 alpha = surface->format->alpha;
877 SDL_GetRGB(colorkey,surface->format,&keyR,&keyG,&keyB);
879 SDL_MapRGB(convert->format, keyR, keyG, keyB));
889 if ( format->Amask ) {
920 if ( surface->format ) {
921 SDL_FreeFormat(surface->format);
922 surface->format = NULL;