org.sikuli.api
Class StaticImageScreen
java.lang.Object
org.sikuli.api.StaticImageScreen
- All Implemented Interfaces:
- Screen
public class StaticImageScreen
- extends Object
- implements Screen
StaticImageScreen class implements a Screen that behaves as if it *always* displays a
given image. All calls to getScreenshot returns the given image. It is useful
for debugging the image search capabilities of the API.
|
Method Summary |
BufferedImage |
getScreenshot(int x,
int y,
int width,
int height)
Creates and returns an image containing a screen capture of the specified arguments of the same name. |
Dimension |
getSize()
Gets the size of this Screen, represented by the returned Dimension. |
StaticImageScreen
public StaticImageScreen(BufferedImage image)
getScreenshot
public BufferedImage getScreenshot(int x,
int y,
int width,
int height)
- Description copied from interface:
Screen
- Creates and returns an image containing a screen capture of the specified arguments of the same name.
x, y, width, height should be within the bounds.
- Specified by:
getScreenshot in interface Screen
- Parameters:
x - the X location of the screen coordinate.y - the Y location of the screen coordinate.width - The width of the region to be captured.height - The height of the region to be captured.
- Returns:
- The captured image.
getSize
public Dimension getSize()
- Description copied from interface:
Screen
- Gets the size of this Screen, represented by the returned Dimension.
- Specified by:
getSize in interface Screen
- Returns:
- a Dimension, representing the size of this Screen.
Copyright © 2014. All rights reserved.