Skip to content

Commit

Permalink
Workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
flyingpie committed Feb 2, 2025
1 parent 13dc94b commit 393cc8b
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/10-Core/Wtq/Utils/SystemExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ namespace Wtq.Utils;

public static class SystemExtensions
{
private static readonly ILogger Log = Utils.Log.For(typeof(SystemExtensions));

public static string ExpandEnvVars(this string src)
{
src ??= string.Empty;
Expand All @@ -30,26 +28,4 @@ public static string ExpandEnvVars(this string src)

return string.Join(separator, values);
}

/// <summary>
/// Returns a rectangle from <paramref name="rects"/>, that does NOT intersect <paramref name="rectsToAvoid"/>.<br/>
/// Returns null if no non-intersecting rectangle could be found.
/// </summary>
public static Rectangle? FindWithNoIntersection(this Rectangle[] rects, Rectangle[] rectsToAvoid)
{
Log.LogDebug("Looking for rectangle within set '{Candidates}', that does not intersect '{Rect}'", rects.StringJoin(), rectsToAvoid);

foreach (var candidate in rects)
{
// if (candidate.IntersectsWith(rectsToAvoid))
// {
// Log.LogDebug("Candidate rectangle '' intersects with ");
// }
}

// var targetRect = rects
// .FirstOrDefault(r => !screenRects.Any(scr => scr.IntersectsWith(r)));

return null;
}
}

0 comments on commit 393cc8b

Please sign in to comment.