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.

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

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 DDate: 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.
http://www.windowslive.com/connect?ocid=TXT_TAGLM_WL_connect2_082008

Hey,In case this is useful to anyone, I wanted to put out word about SDL_ColorDef. It’s a header that has the obvious contents. You just say:Uint32 mycolor = RGB_TEAL(mysurface);instead of using SDL_MapRGB(mysurface->format, 0, 255, 255).You can use alpha, too:mycolor = RGBA_YELLOWDK(mysurface, alpha);I just added the html colors from the W3C, so you can use those (all lowercase):mycolor = RGB_steelblue(mysurface);There are over 200 colors now and I found myself using them enough that I should advise the list in case you guys find it equally useful. I’ve found it good for graphics primitives and widgets.Jonny D_________________________________________________________________
Get thousands of games on your PC, your mobile phone, and the web with Windows?.
http://clk.atdmt.com/MRT/go/108588800/direct/01/

Here’s the link:

http://pubpages.unh.edu/~jmb97/SDL.html

Jonny D_________________________________________________________________
Talk to your Yahoo! Friends via Windows Live Messenger. Find out how.
http://www.windowslive.com/explore/messenger?ocid=TXT_TAGLM_WL_messenger_yahoo_082008