rotation

Started by
2 comments, last by GameDev.net 18 years, 8 months ago
how to do the rotation to the bitmap file in win32 API? I found only BitBLt()can do transformation only?
Advertisement
The simple answer: It can't be done using GDI.

The slightly less simple answer: There are ways around it.
I teleported home one night; With Ron and Sid and Meg; Ron stole Meggie's heart away; And I got Sydney's leg. <> I'm blogging, emo style
Ough. You don't really want to torture yourself with the Win32 API while posting in the For Beginners forum, do you? I'm not bashing you for being somewhat new, let's get that straight. But might I interest you in SDL? It has several libraries that will do this for you, and also allows you to use OpenGL directly with it, which allows you to take advantage of hardware rotation. And if you are worried about it not being used in the professional industry, Civilization 4 uses it. Plus, it is cross-platform.

That's my two cents, but follow the link the other guy gave you if it is really important for you to stick with the Win32 API. Thanks! I like SDL!
my siteGenius is 1% inspiration and 99% perspiration
Quote:Original post by xMcBaiNx
The simple answer: It can't be done using GDI.


it can be done in GDI using XFORMs, just not on 9x versions.

you can also use GDI+ to do the rotation on any version except 95. very fast, with a good set of quality settings.

there's also a number of image libraries out there that will rotate a DIB, none using GetPixel/SetPixel, and some using mmx/sse code.

This topic is closed to new replies.

Advertisement