Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VisionAdapter

VisionAdapter serves as an abstraction layer for all image based interactions.

This allows to provide a high level interface for image based actions, without having to spread (possibly) multiple dependencies all over the code. All actions which involve screenshots / images are bundled in this adapter.

Hierarchy

  • VisionAdapter

Index

Constructors

constructor

Methods

findOnScreenRegion

grabScreen

  • grabScreen(): Promise<Image>

grabScreenRegion

highlightScreenRegion

  • highlightScreenRegion(region: Region, duration: number, opacity: number): Promise<void>

saveImage

  • saveImage(image: Image, path: string): Promise<void>

screenHeight

  • screenHeight(): Promise<number>
  • screenHeight returns the main screens height as reported by the OS. Please notice that on e.g. Apples Retina display the reported width and the actual pixel size may differ

    Returns Promise<number>

    The main screens height as reported by the OS

screenSize

  • screenSize(): Promise<Region>

screenWidth

  • screenWidth(): Promise<number>
  • screenWidth returns the main screens width as reported by the OS. Please notice that on e.g. Apples Retina display the reported width and the actual pixel size may differ

    Returns Promise<number>

    The main screens width as reported by the OS