Archived

This topic is now archived and is closed to further replies.

brain21

Win32 GDI and Rotations

Recommended Posts

Hello, I''ve been learning how to make Win32 programs for awhile now, but I cannot figure out how to rotate a bitmap using the GDI or Win32. I can create and load a bitmap and display it onto the screen, but I can''t seem to figure out how to rotate it onto the window. I''ve used SetWorldTransform() and set the XFORM structure to the right (I hope) values. This doesn''t do anything. Does anyone know how to do this?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
SetWorldTransform is not supported on 9x boxes so if that''s your testing platform you''ll have to rotate the bitmap texels yourself or use something else besides GDI.

if you''re testing on NT/2K/XP then post some code.

Share this post


Link to post
Share on other sites
I was using Win98. That weird. So that means I have to write the rotation algo myself? and I guess use the GDI setpixe(I mean watever) to draw it? Thats going to be slow.

Are there any other alternatives without using DX or anything other than Win32 API and GDI??

Share this post


Link to post
Share on other sites
Not really ... The Win32 GDI is THE windows graphic interface ... they only create WinG (which became DirectX) exactly for the reasons you are talking about ... to support hardware acceleration and features more directly. As far as I know there are only 3 root level protocols supported by Windows drivers ... GDI, DirectX, OpenGL ... anything else must be implemented in terms of one of those, because the hardware vendors only accelerate their drivers for those 3 APIs.

Share this post


Link to post
Share on other sites