More WIndows specific parts moved to this project

This commit is contained in:
Dan Clark
2024-11-02 20:57:13 +00:00
parent 48c63b3bb0
commit 81e39f9895
25 changed files with 528 additions and 68 deletions
+11
View File
@@ -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);
}