-
January 2nd, 2022, 07:04 AM
#1
How to Rotate a Bitmap in WinAPI?
Hi all,
This is all way over my head...
Any ideas how to rotate a bitmap by a specified angle in WinAPI?
I was told to use SetWorldTransform() and an xForm structure.
However, I'm not sure how to populate the xForm structure and SetWorldTransform apparently changes the characteristics of the Device Context on which it operates?
Any ideas / sample code is welcome.
-
January 3rd, 2022, 11:29 AM
#2
Re: How to Rotate a Bitmap in WinAPI?
Ok, so I've tried some mathematical transforms on the three (X, Y) coords required by the PlgBlt() function instead...
Problem is, the origin of rotation seems to be stuck to (0,0) (The Upper-left corner of the window). When I rotate the sprite it rotates OFF the screen after 45 Degrees of rotation.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|