Jump to content
  • Advertisement

Archived

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

Holy Fuzz

Managed DX: Strange Device.ScissorRectangle problem.

This topic is 5217 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

I''m having a very strange problem with using Scissor Rectangles in managed DX (C#). Here''s some code: Rectangle r1 = new Rectangle(40, 25, 200, 300); dev.ScissorRectangle = r1; Rectangle r2 = dev.ScissorRectangle; MessageBox.Show(r2.ToString()); That code prints out: "{X=40,Y=25,Width=280,Height=350}" Notice that all of the following will evaluate to true: r2.X == r1.X; r2.Y == r1.Y; r2.Width == 2*r1.X + r1.Width; r2.Height == 2*r1.Y + r1.Height; My tests have shown these equalities to hold for ANY values of r1, not just 40, 25, 200, and 300. It is also JUST the return value of dev.ScissorRect that is screwed up. My application correctly clips the graphics to the rectangle specified by r1. Strange, huh? Is this a bug, a "feature," or something I''m doing wrong? Thanks all! - Fuzz

Share this post


Link to post
Share on other sites
Advertisement

  • 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!