本文整理匯總了Python中org.sikuli.script.Screen.getBounds方法的典型用法代碼示例。如果您正苦於以下問題:Python Screen.getBounds方法的具體用法?Python Screen.getBounds怎麽用?Python Screen.getBounds使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.sikuli.script.Screen
的用法示例。
在下文中一共展示了Screen.getBounds方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from org.sikuli.script import Screen [as 別名]
# 或者: from org.sikuli.script.Screen import getBounds [as 別名]
def __init__(self, id=None):
if DEBUG: print "**IN*** Jython INIT Screen"
if id != None:
r = JScreen.getBounds(id)
else:
r = JScreen.getBounds(JScreen.getPrimaryId())
(x, y, w, h) = (int(r.getX()), int(r.getY()), \
int(r.getWidth()), int(r.getHeight()))
Region.__init__(self, x, y, w, h)
self.setScriptingType("JythonScreen")
if DEBUG: print "**OUT** Jython INIT Screen"
示例2: __init__
# 需要導入模塊: from org.sikuli.script import Screen [as 別名]
# 或者: from org.sikuli.script.Screen import getBounds [as 別名]
def __init__(self, id=None):
try:
if id != None:
r = JScreen.getBounds(id)
s = JScreen.getScreen(id)
else:
id = JScreen.getPrimaryId()
r = JScreen.getBounds(id)
s = JScreen.getScreen(id)
(self.x, self.y, self.w, self.h) = (int(r.getX()), int(r.getY()), \
int(r.getWidth()), int(r.getHeight()))
self.initScreen(s)
except:
Debug.log(3, "Jython: init: exception while initializing Screen\n%s", sys.exc_info(0))
sys.exit(1)
示例3: __init__
# 需要導入模塊: from org.sikuli.script import Screen [as 別名]
# 或者: from org.sikuli.script.Screen import getBounds [as 別名]
def __init__(self, id=None):
if id != None:
r = JScreen.getBounds(id)
else:
r = JScreen().getBounds()
(x, y, w, h) = (int(r.getX()), int(r.getY()), \
int(r.getWidth()), int(r.getHeight()))
Region.__init__(self, x, y, w, h)