• Advertisement


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

Managed DX: Strange Device.ScissorRectangle problem.

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