Res: SDL_SoftStretch ignore ColorKey and Clip Rect

Hi Jonathan,

Thank for your reply…

SPG_TransformSurface work (better than sge_transform (SGE) and rotozoom from (SDL_gfx))

But…in some cases SPG_TransformSurface don’t behave like the expected. Example, with RGBA surfaces the alpha was not considered. And with surfaces with alpha changed (SDL_SetAlpha) the alpha is not considered too.

  • Try to load a targa or png with alpha, and blit transforming
  • Try to change the alpha value of a surface and blit transforming

[I don’t know if I’m doing something wrong, tell me if works for you or someone]

Maybe SPG_TransformSurface should "choice" the "best" "TRANSFORM" function with function pointers (like the SDL_LowerBlit) and consider ColorKey, Alpha, RGBA, and so on.

Regards

Vinicius Jarina

----- Mensagem original ----De: Jonathan Dearborn
Para: A list for developers using the SDL library. (includes SDL-announce)
Enviadas: Sexta-feira, 15 de Agosto de 2008 9:28:49
Assunto: Re: [SDL] SDL_SoftStretch ignore ColorKey and Clip Rect

You can take a look at the Sprig or SGE rotation. It works as a blit, supports cliprects, and Sprig’s version can use your colorkey (SPG_TCOLORKEY). I haven’t compared the speed with rotozoom, though.

SDL_Rect SPG_TransformSurface(SDL_Surface *src, SDL_Surface *dst, float angle, float xscale, float yscale, Uint16 pivotx, Uint16 pivoty, Uint16 destx, Uint16 desty, Uint8 flags)

SDL_Rect sge_transform(SDL_Surface *src,
SDL_Surface *dst, float angle, float xscale, float yscale, Uint16 px,
Uint16 py, Uint16 qx, Uint16 qy, Uint8 flags)

Jonny D


Date: Fri, 15 Aug 2008 00:25:02 -0700
From: vinicius.jarina@yahoo.com.br
To: sdl at lists.libsdl.org
Subject: [SDL] SDL_SoftStretch ignore ColorKey and Clip Rect

Hi, I’m tring bliting stretching a surface

I’m using SDL_SoftStretch, and apparently it ignore ColorKey and Clip Rect.

(before anyone say “Use zoomSurface from SDL_gfx”, I don’t like SDL_gfx implementation, is not fast, and create a new surface, I just wan’t blit stretching considering clipping and key)

Thanks

Vinicius Jarina
viniciusjarina.googlepages.com


Novos endere?os, o Yahoo! que voc? conhece. Crie um email novo com a sua cara @ymail.com ou @rocketmail.com.


See what people are saying about Windows Live. Check out featured posts. Check It Out!

  Novos endere?os, o Yahoo! que voc? conhece. Crie um email novo com a sua cara @ymail.com ou @rocketmail.com.

http://br.new.mail.yahoo.com/addresses