Hex1bTerminalSnapshotRegion
Namespace: Hex1b.Automation
Assembly: Hex1b.dll
A lightweight view into a terminal snapshot that provides localized coordinates. The region translates local (0,0)-based coordinates to the absolute position in the snapshot.
public sealed class Hex1bTerminalSnapshotRegion : IHex1bTerminalRegionInheritance
Object → Hex1bTerminalSnapshotRegion
Implements
Properties
Bounds
The absolute bounds of this region within the parent.
Returns: Rect
public Rect Bounds { get; }Height
The height of this region.
Returns: Int32
public int Height { get; }Width
The width of this region.
Returns: Int32
public int Width { get; }Methods
GetCell(int, int)
Gets the cell at the specified position within this region.
Parameters:
Returns: TerminalCell
The terminal cell, or if out of bounds.
public TerminalCell GetCell(int x, int y)GetRegion(Rect)
Gets a sub-region with localized coordinates.
Parameters:
bounds(Rect): The bounds of the region to extract, relative to this region.
Returns: Hex1bTerminalSnapshotRegion
A region view that translates local coordinates.
public Hex1bTerminalSnapshotRegion GetRegion(Rect bounds)Remarks
This is useful for comparing regions of the screen regardless of their absolute position, such as comparing a rendered widget to a known baseline.