Class VisibleRegions
- Namespace
- SharpConsoleUI
- Assembly
- SharpConsoleUI.dll
Calculates visible regions of windows by subtracting overlapping areas from higher z-order windows. Used by the rendering system to determine which portions of a window need to be drawn.
public class VisibleRegions
- Inheritance
-
VisibleRegions
- Inherited Members
- Extension Methods
Constructors
VisibleRegions(ConsoleWindowSystem)
Initializes a new instance of the VisibleRegions class.
public VisibleRegions(ConsoleWindowSystem consoleWindowSystem)
Parameters
consoleWindowSystemConsoleWindowSystemThe console window system that owns this visible regions calculator.
Methods
CalculateVisibleRegions(Window, List<Window>)
Calculates the visible regions of a window by subtracting areas covered by overlapping windows.
public List<Rectangle> CalculateVisibleRegions(Window window, List<Window> overlappingWindows)
Parameters
windowWindowThe window to calculate visible regions for.
overlappingWindowsList<Window>List of windows that overlap with the target window (typically higher z-order).
Returns
CalculateVisibleRegions(Rectangle, List<Window>)
Calculates visible regions of an arbitrary rectangle by subtracting overlapping windows. Used for desktop clears to avoid overwriting visible windows.
public List<Rectangle> CalculateVisibleRegions(Rectangle area, List<Window> overlappingWindows)
Parameters
areaRectangleThe rectangle area to calculate visibility for.
overlappingWindowsList<Window>Windows that overlap with the area.