org.sikuli.api
Class StyledRectangleTarget

java.lang.Object
  extended by org.sikuli.api.DefaultTarget
      extended by org.sikuli.api.ImageTarget
          extended by org.sikuli.api.StyledRectangleTarget
All Implemented Interfaces:
Target

public class StyledRectangleTarget
extends ImageTarget

StyledRectangleTarget class is used to identify rectangular targets that have a particular rectangle style (lines and corners) while ignoring the content inside the rectangle.

For example, it can be used to find buttons that have the same rounded corners.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.sikuli.api.Target
Target.Ordering
 
Constructor Summary
StyledRectangleTarget(BufferedImage image)
          Creates a StyledRectangleTarget from a BufferedImage.
StyledRectangleTarget(File file)
          Creates a StyledRectangleTarget from a File object.
StyledRectangleTarget(URL url)
          Creates a StyledRectangleTarget from an image at a given URL.
 
Method Summary
 
Methods inherited from class org.sikuli.api.ImageTarget
getImage, getURL, toImage, toString
 
Methods inherited from class org.sikuli.api.DefaultTarget
doFindAll, getLimit, getMinScore, getOrdering, setLimit, setMinScore, setOrdering
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.sikuli.api.Target
doFindAll, getLimit, getMinScore, getOrdering, setLimit, setMinScore, setOrdering
 

Constructor Detail

StyledRectangleTarget

public StyledRectangleTarget(URL url)
Creates a StyledRectangleTarget from an image at a given URL. The corners will be automatically identified from the specified URL image.

Parameters:
url - the URL to load the image of the target.
Throws:
IOException - thrown if the image can not be loaded

StyledRectangleTarget

public StyledRectangleTarget(File file)
Creates a StyledRectangleTarget from a File object. The corners will be automatically identified from the specified File image.

Parameters:
file - the File to read image data from.
Throws:
IOException - thrown if the File can not be read.

StyledRectangleTarget

public StyledRectangleTarget(BufferedImage image)
Creates a StyledRectangleTarget from a BufferedImage.

Parameters:
image - the image representing this StyledRectangleTarget. The corners will be automatically identified from the specified BufferedImage.


Copyright © 2014. All rights reserved.