Jump to content
  • Advertisement
Sign in to follow this  
Hebass

Drawing a section of a Rotated Bitmap

This topic is 4839 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... .. | | ...as 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!