[SDL] Stretch Blitting

Vincent R. forumer at smartmobili.com
Sat Apr 25 09:11:00 PDT 2009

On Sat, 25 Apr 2009 15:05:13 +0200, "Vincent R." <forumer at smartmobili.com>
> Hi,
> I wanted to evaluate SDL on windows CE and I am not convinced.
> Firt thing I want to do is to load a png and reduce display size, is it
> possible to do it ?
> For instance I am loading a 320x240 png and I want to display it as
>>From what I read there is SDL_gfx but is very slow, so is there any other
> option ?
> Thanks

I have found STL_Stretch and I have compiled it for wince.
Now I don't really understand how to use it? If someone could provide a
very small 
sample code where a png(240x320) is load and displayed centered in 80x60.
I am trying this but with no success :

static SDL_Surface *sprite;

sprite = IMG_Load(file);
converted = SDL_DisplayFormat(sprite);

position.x = position.y = 0;
position.w = 80;
position.h = 60;

updates[1] = position;
SDL_StretchSurfaceBlit(sprite, NULL, screen, &position);


More information about the SDL mailing list