More WIndows specific parts moved to this project
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
using Windows.Win32.Foundation;
|
||||
|
||||
namespace Toolkit.Windows;
|
||||
|
||||
internal static class RectExtensions
|
||||
{
|
||||
internal static Rect ToRect(this RECT rect) =>
|
||||
rect.right - rect.left < 0 || rect.bottom - rect.top < 0
|
||||
? new Rect(rect.left, rect.top, 0, 0)
|
||||
: new Rect(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
|
||||
}
|
||||
Reference in New Issue
Block a user