|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sikuli.api.AbstractScreenRegion
public abstract class AbstractScreenRegion
AbstractScreenRegion is the abstract base class for all screen region contexts.
| Constructor Summary | |
|---|---|
AbstractScreenRegion(Screen screen)
Constructs a new AbstractScreenRegion object whose Screen is the specified Screen object, and upper-left corner is at (0, 0) in the coordinate space. |
|
AbstractScreenRegion(Screen screen,
int x,
int y,
int width,
int height)
Constructs a new AbstractScreenRegion object. |
|
| Method Summary | |
|---|---|
Rectangle |
getBounds()
Returns the bounding Rectangle of this Region. |
ScreenLocation |
getCenter()
Returns the center of this screen region. |
int |
getHeight()
Returns the height of the rectangular screen region. |
ScreenLocation |
getRelativeScreenLocation(int xoffset,
int yoffset)
Returns a ScreenRegion relative to the specified region values. |
ScreenRegion |
getRelativeScreenRegion(int xoffset,
int yoffset,
int width,
int height)
Returns a ScreenRegion relative to the specified region values. |
double |
getScore()
Returns the minimum matching score of this ScreenRegion, which is set if this screen region was returned as the result of a find command. |
Screen |
getScreen()
Returns a Screen object of this ScreenRegion. |
int |
getWidth()
Returns the width of the rectangular screen region. |
int |
getX()
Returns the X coordinate of the upper-left corner of the rectangular screen region. |
int |
getY()
Returns the Y coordinate of the upper-left corner of the rectangular screen region. |
void |
setBounds(Rectangle newBounds)
Sets the bounding Rectangle of this Rectangle. |
void |
setHeight(int height)
Sets the height of the rectangular screen region. |
void |
setScore(double score)
Sets the minimum matching score value for a target to be considered a match. |
void |
setScreen(Screen screen)
Sets the Screen of this ScreenRegion to be the specified Screen. |
void |
setWidth(int width)
Sets the width of the rectangular screen region. |
void |
setX(int x)
Sets the X coordinate of the upper-left corner of the rectangular screen region. |
void |
setY(int y)
Sets the Y coordinate of the upper-left corner of the rectangular screen region. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.sikuli.api.ScreenRegion |
|---|
addROI, addState, addStateChangeEventListener, addTargetEventListener, capture, find, findAll, getLastCapturedImage, getLowerLeftCorner, getLowerRightCorner, getROIs, getState, getStates, getUpperLeftCorner, getUpperRightCorner, removeState, removeTargetEventListener, snapshot, wait |
| Constructor Detail |
|---|
public AbstractScreenRegion(Screen screen)
screen - The Screen to create a region from.
public AbstractScreenRegion(Screen screen,
int x,
int y,
int width,
int height)
screen - The Screen to create a region from.x - The X coordinate of the upper-left corner of the rectangular screen region.y - The Y coordinate of the upper-left corner of the rectangular screen region.width - The width of the rectangular screen region.height - The height of the rectangular screen region.| Method Detail |
|---|
public Rectangle getBounds()
Region
getBounds in interface Regionpublic void setBounds(Rectangle newBounds)
Region
setBounds in interface RegionnewBounds - the specified bounding Rectangle.
public ScreenRegion getRelativeScreenRegion(int xoffset,
int yoffset,
int width,
int height)
ScreenRegion
getRelativeScreenRegion in interface ScreenRegionxoffset - Horizontal offset.yoffset - Vertical offset.width - the width of this ScreenRegion.height - the height of this ScreenRegion.
public ScreenLocation getRelativeScreenLocation(int xoffset,
int yoffset)
ScreenRegion
getRelativeScreenLocation in interface ScreenRegionxoffset - Horizontal offset.yoffset - Vertical offset.
public ScreenLocation getCenter()
ScreenRegion
getCenter in interface ScreenRegionpublic String toString()
toString in class Objectpublic Screen getScreen()
ScreenRegion
getScreen in interface ScreenRegionScreen of this ScreenRegion.public double getScore()
ScreenRegion
getScore in interface ScreenRegionpublic void setScore(double score)
ScreenRegion
setScore in interface ScreenRegionscore - the minimum matching score value for a target to be considered a match.
The value should be between 0 and 1.public void setScreen(Screen screen)
ScreenRegion
setScreen in interface ScreenRegionscreen - the Screen for this ScreenRegion.public int getX()
getX in interface Regionpublic void setX(int x)
x - the X coordinate of the upper-left corner of the rectangular screen region.public int getY()
getY in interface Regionpublic void setY(int y)
y - the Y coordinate of the upper-left corner of the rectangular screen region.public int getWidth()
getWidth in interface Regionpublic void setWidth(int width)
width - the width of the rectangular screen region.public int getHeight()
getHeight in interface Regionpublic void setHeight(int height)
height - the height of the rectangular screen region.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||