本文整理汇总了Python中object.Object.resize方法的典型用法代码示例。如果您正苦于以下问题:Python Object.resize方法的具体用法?Python Object.resize怎么用?Python Object.resize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类object.Object
的用法示例。
在下文中一共展示了Object.resize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: resize
# 需要导入模块: from object import Object [as 别名]
# 或者: from object.Object import resize [as 别名]
def resize(self, x, y):
source = Size()
source.width = self.width
source.height = self.height
Object.resize(self, x, y)
target = Size()
target.width = self.width
target.height = self.height
if len(self.separators) > 0:
for separator in self.separators:
if separator.direction == HORIZONTAL and source.height and target.height:
separator.position = separator.position / source.height * target.height
separator.hidden = False
elif separator.direction == VERTICAL and source.width and target.width:
separator.position = separator.position / source.width * target.width
separator.hidden = False
else:
separator.hidden = True
示例2: resize
# 需要导入模块: from object import Object [as 别名]
# 或者: from object.Object import resize [as 别名]
def resize(self, x, y):
self.cursor.visible = False
Object.resize(self, x, y)
示例3: resize
# 需要导入模块: from object import Object [as 别名]
# 或者: from object.Object import resize [as 别名]
def resize(self, x, y):
Object.resize(self, x, y)
self.start.x = self.handler.pivot.x
self.start.y = self.handler.pivot.y
self.end.x = x
self.end.y = y
示例4: resize
# 需要导入模块: from object import Object [as 别名]
# 或者: from object.Object import resize [as 别名]
def resize(self, x, y):
Object.resize(self, x, y)
if self.type is DATAMATRIX | QR:
size = max(self.width, self.height)
self.width = self.height = size