Table of Contents

Class AbstractScreenshotController

Namespace
NetAutoGUI.Internals
Assembly
NetAutoGUI.dll
public abstract class AbstractScreenshotController : IScreenshotController
Inheritance
AbstractScreenshotController
Implements
Inherited Members
Extension Methods

Methods

Highlight(params Rectangle[])

Highlight several areas

public abstract void Highlight(params Rectangle[] rectangles)

Parameters

rectangles Rectangle[]

multiple areas to highlight

LocateAllWithConfidence(BitmapData, BitmapData, double)

Locates all occurrences of a given bitmap within a base image with a specified confidence level.

public RectangleWithConfidence[] LocateAllWithConfidence(BitmapData basePicture, BitmapData bitmapToBeFound, double confidence = 0.99)

Parameters

basePicture BitmapData

The base image where the search is performed

bitmapToBeFound BitmapData

The image to locate within the base image

confidence double

The confidence level required for a match, ranging from 0.0 to 1.0. A value closer to 1.0 ensures higher accuracy but may result in fewer matches.

Returns

RectangleWithConfidence[]

An array of RectangleWithConfidence objects, each representing a located instance of bitmapToBeFound within basePicture, along with the confidence score.

Screenshot()

Take a screenshot. If there are multiple monitors, they will be displayed into a single image with system's multiple displays' arrangement. On Windows, please invoke GUIWindows.Initialize() at the beginning of application's entry, for example Main() or Program.cs

public abstract BitmapData Screenshot()

Returns

BitmapData

Screenshot(Window)

Take a screenshot of a window.

public abstract BitmapData Screenshot(Window window)

Parameters

window Window

Returns

BitmapData

ScreenshotLocationToRelativeLocation(int, int)

Convert the location of the screenshot to the relative location to the primary screen.

public abstract (int x, int y) ScreenshotLocationToRelativeLocation(int x, int y)

Parameters

x int
y int

Returns

(int x, int y)