Managed DX: Strange Device.ScissorRectangle problem.

Started by
-1 comments, last by Holy Fuzz 19 years, 11 months ago
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

This topic is closed to new replies.

Advertisement