org.sikuli.api
Class StaticImageScreen

java.lang.Object
  extended by 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.


Constructor Summary
StaticImageScreen(BufferedImage image)
           
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticImageScreen

public StaticImageScreen(BufferedImage image)
Method Detail

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.