Xanather wrote:
Does anyone know why the SharpDX.Rectangle has left, top, right and bottom fields. Shouldn't it be X, Y, Width, Height (seems easier to use?).
The DrawingRectangle and SharpDX.Rectangle struct are an historical choice in SharpDX and a side effect of System.Drawing removed from .NET Core (in WinRT). SharpDX.Rectangle is used by several DirectX APIs that are expecting to have Left,Top, Right, Bottom serialized like this. So SharpDX was only defining this class. In the past, there was no DrawingRectangle, but because System.Drawing rectangle was removed, and in order to keep some SharpDX API that were using it, DrawingRectangle was introduced. Note that there is an implicit cast between the two.
Xanather wrote:
There is also a SharpDX.DrawingRectangle class which does this but it still seems odd, Also should the Rectangle class(s) have a intersect method?
Both objects are used for interop and so far not used for performing operations on it, but feel free to contribute to it (via github and a pull request). A bit of reflector on System.Drawing.Rectangle should give you enough idea about how to implement it.