Skip to content

Overlay

Namespace: E2E.Decision

public static class Overlay

Upstream’s overlay.ts. A viewport point is an Point, in CSS pixels.

Inheritance: object

View source

public const double CellTarget = 80

Target cell size of a first look in CSS pixels (upstream’s CELL_TARGET). A 1280 by 720 viewport gets 10 columns of 128px and 9 rows of 80px.

Value: double

public static Grid GridFor(double width, double height, double cellTarget)

Upstream’s gridFor: the grid for an image, as close to <code class=“paramref”>cellTarget</code> CSS pixels per cell as the level cap allows.

Parameters

Name Type Description
width double
height double
cellTarget double

Returns: Grid

public static Point PointOf(Grid grid, double column, double row)

Upstream’s pointOf: the point a column and row score name on a grid: the center of the scored position, inside the image.

Parameters

Name Type Description
grid Grid
column double
row double

Returns: Point

public static string? RegionHash(Screenshot? screenshot, Point center, double box)

Upstream’s regionHash: a hash of the <code class=“paramref”>box</code> by <code class=“paramref”>box</code> CSS-pixel region around <code class=“paramref”>center</code>: what a tap there changed, read without the rest of the page. Null without pixels or when they cannot be decoded.

Parameters

Name Type Description
screenshot Screenshot
center Point
box double

Returns: string

public static Screenshot WithGrid(Screenshot screenshot, Grid grid)

Upstream’s withGrid: the screenshot with the grid’s cell borders drawn on it. Returns the input untouched when it cannot be decoded.

Parameters

Name Type Description
screenshot Screenshot
grid Grid

Returns: Screenshot

ZoomAround(Screenshot, Point, double, double)

Section titled “ZoomAround(Screenshot, Point, double, double)”
public static Zoom? ZoomAround(Screenshot screenshot, Point center, double box, double factor)

Upstream’s zoomAround: the <code class=“paramref”>box</code> by <code class=“paramref”>box</code> CSS-pixel region around <code class=“paramref”>center</code>, kept inside the screenshot and enlarged <code class=“paramref”>factor</code> times (nearest neighbor), for a finer closer look at a drawn control. Null when the pixels cannot be decoded or the region comes out under one pixel, which no PNG can hold.

Parameters

Name Type Description
screenshot Screenshot
center Point
box double
factor double

Returns: Zoom