Advertisement Jump to content
Sign in to follow this  

Drawing a section of a Rotated Bitmap

This topic is 4902 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm currently working on a way to draw just a section of a bitmap after it is rotated in DirectX. I'm working in C++. Unfortunately, the Draw function takes a source RECT and it still applies to the original image whether it's rotated or not. This is what I'm looking for... // disregard the periods as they're only to create spaces... .. | | ... | ...changed to... / .. / ....... / ...then give a source rect and it would end up like this... .. | | you can see, the right section of the picture has been chopped off. So anotherwords after the bitmap is rotated about the center, I would like it to draw a normal source RECT that isn't bound to the actual image. Rather, I would like it to chop off whatever has been rotated below my source rectangle. After this would occur, I could then rotate the image back to it's original rotation with the portion I wanted missing. I don't want this to get too intensive as it wouldn't be worth it for what I'm using it for. I know this may seem ridiculous, but doing this without rotating the image makes the bitmap look incorrect if I only draw a section of the bitmap. Any help would be greatly appreciated. Thank you. ps. sorry for the horrible diagram.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!