I did the inevitable - I solved it right after I posted this message.
The problem was (of course, some might say) my code, not the SDL library - although I do think it behaves a little improperly.
As soon as an image is clipped with any of the clipping rectangle borders, the x and y elements of the destination SDL_Rect supplied in the SDL_Blt() method are modified - all other cases leave the SDL_Rect intact.
Anders> ----- Original Message -----
From: @Anders_Emil_Hansen (Anders Emil Hansen)
Sent: Thursday, August 23, 2001 4:27 PM
Subject: resampled image clip problem
I’m a newbie to SDL - I have only recently started using it in conjunction with an Isometric game I am developing.
So far, I’ve encountered one serious problem that I would like a fix for asap. I have written a small method called SDL_resampleSurface() which takes a standard SDL_Surface pointer and a desired width and height. It then returns a pointer to a new surface, which holds the bicubicly resampled new surface (created with the SDL_CreateRGBSurfaceFrom() method).
My problem is: When I blit this generated surface on the display surface within the clipping rectangle it works OK, but as soon as the surface clips with any clipping rectangle border set with SDL_SetClipRect(), it seems to screw up the blitting of the remaining surfaces.
I have tried everything, but the ONLY thing that seems to screw up is the SDL_Blt() method itself.
Has anyone encountered any problem like this? It seems it ONLY happens with surfaces created with SDL_CreateRGBSurfaceFrom()!
Anders / Denmark