SDL_stretch?

Hello all,

I found SDL_stretch code in the SDL library, and references to it in the
mailing archives, yet no information to be found within the documentation.
Can anyone tell me what the status of that code is, and if the functions are
usable (and how?:)?

Regards,

Pieter Hulshoff

Pieter Hulshoff wrote:

Hello all,

I found SDL_stretch code in the SDL library, and references to it in the
mailing archives, yet no information to be found within the documentation.
Can anyone tell me what the status of that code is, and if the functions are
usable (and how?:)?

Regards,

Pieter Hulshoff

sdl uses SDL_SoftStretch for software mode YUVOverlay stretching
(see SDL_yuv_sw.c:SDL_DisplayYUV_SW) after the conversion to RGB is done), of course.
it also works if you want to use it directly, but it has a major requirement that the src and dest surface pixel formats MUST match.
it does not alpha/colorkey processing, it’s only an RGB style stretch, nothing like a full SDL_BlitSurface call.
and it may not be safe to call it when the same surface is used for src and dest…not sure about that, but better safe than sorry.
also there’s a note in the source: This function is not safe to call from multiple threads!

I’ve played with using it, it’s not hard to use, but if you need something more, try SDL_gfx’s SDL_rotozoom (see libsdl.org’s libraries page).

-LIM-

Thanx, I’ll have a look at it. :slight_smile:

Regards,

Pieter HulshoffOn Sunday 27 February 2005 11:48, Jonathan Atkins wrote:

I’ve played with using it, it’s not hard to use, but if you need something
more, try SDL_gfx’s SDL_rotozoom (see libsdl.org’s libraries page).