- Home /
Screen Points to construct a Rect (Not axis aligned)
Hi everyone , I have four Screen points A,B,C,D as seen in the image below
This is the ideal Situation where A(x,y)= (Xmin,Ymin) B(x) = Xmax C(y) = Ymax
and I get to construct a rect by the definition Rect (Xmin,Ymin,Xmax,Ymax) But
In a situation above I get point B with Ymin ,A with Xmin, and D with Xmax , C with Ymax So the definition by which I declare the rect becomes wrong !
Note: 1. I am using this rect to capture a screenshot of region on screen using corners (A,B,C,D) Note 2. The points A,B,C,D are screen points i.e. Normalized Device Coordinates
I would like to capture the screenshot of given rectangle in any possible position. I know the condition in image 1 is called Axis Aligned Position but for any other position definition of Rect becomes invalid . Can Anybody help ?? Cheers !!