View Full Version : Rotating Images in Classic
Anyone know of a way to rotate images in Classic? I would rather not have to include a few million (ok, maybe a hundred or so) rotated images with my app...
OneSadCookie
2002.07.12, 11:07 PM
QuickTime can rotate images... maybe just in the GraphicsImporter, but that should be good enough. I doubt it would be fast enough that you could rotate them on the fly anyway.
You need to manipulate the matrix it uses to draw the images. The functions are in ImageCompression.h
Zwilnik
2002.07.13, 02:39 PM
If it's a 2D game, then OpenGL is probably the ideal route if you want to rotate the sprites a lot. If it's a tool/art app etc. then OneSadCookie's suggestion of Quicktime may well be the fastest (that or your own custom routine).
aarku
2002.07.18, 12:01 PM
There are some routines in SpriteWorld (http://www.spriteworld.org) to do that. In version 2.3 they are under BlitPixieRotated.c and I think they could be modified with a little effort for non-SW projects. The are also very fast -meant to be part of animation. But I'd look at the code section about rotating a frame (GWorld) into a new frame. It's a function called CreateRotatedFrameFromFrame I believe.
Good luck.
-Jon
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.