本文整理匯總了Python中rectangle.Rectangle.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python Rectangle.__init__方法的具體用法?Python Rectangle.__init__怎麽用?Python Rectangle.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rectangle.Rectangle
的用法示例。
在下文中一共展示了Rectangle.__init__方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from rectangle import Rectangle [as 別名]
# 或者: from rectangle.Rectangle import __init__ [as 別名]
def __init__(self):
# self.id = random.uniform(0, 999999999)
Rectangle.__init__(self)
self.handler = Handler()
self.magnetos = Magnetos()
self.offset = Point()
self.pivot = Point()
self.selected = False
self.resizing = False
self.direction = NONE
self.control = AUTOMATIC
self.z = 0
self.hints = False
from ui.canvas import Canvas
self.canvas = Canvas()
self.handler.is_testing = self.canvas.is_testing
self.dash = []
self.thickness = 1.0
self.fill_style = COLOR
self.fill_color = Color(0.25, 0.25, 0.25, 0.25)
self.stroke_color = Color(0.25, 0.25, 0.25, 1.0)
self.gradient = Gradient()
示例2: __init__
# 需要導入模塊: from rectangle import Rectangle [as 別名]
# 或者: from rectangle.Rectangle import __init__ [as 別名]
def __init__(self):
Rectangle.__init__(self)
self.hidden = False
self.position = 0.0
self.direction = NONE
self.control = Control()
self.control.limbus = True
示例3: __init__
# 需要導入模塊: from rectangle import Rectangle [as 別名]
# 或者: from rectangle.Rectangle import __init__ [as 別名]
def __init__(self):
Rectangle.__init__(self)
self.active = True
self.top = 0
self.left = 0
self.bottom = 0
self.right = 0
self.control = list()
index = 0
while index < 8:
control = Control()
self.control.append(control)
index += 1
示例4: __init__
# 需要導入模塊: from rectangle import Rectangle [as 別名]
# 或者: from rectangle.Rectangle import __init__ [as 別名]
def __init__(self):
Rectangle.__init__(self)
self.active = True
self.tags = list()
self.magnetism = 32
示例5: __init__
# 需要導入模塊: from rectangle import Rectangle [as 別名]
# 或者: from rectangle.Rectangle import __init__ [as 別名]
def __init__(self):
Rectangle.__init__(self)
self.active = False
示例6: __init__
# 需要導入模塊: from rectangle import Rectangle [as 別名]
# 或者: from rectangle.Rectangle import __init__ [as 別名]
def __init__(self):
Rectangle.__init__(self)
self.position = 0
self.selected = False
self.size = 25
self.orientation = NONE
示例7: __init__
# 需要導入模塊: from rectangle import Rectangle [as 別名]
# 或者: from rectangle.Rectangle import __init__ [as 別名]
def __init__(self):
Rectangle.__init__(self)
self.active = True
self.size = 15.0
self.snap = True
示例8: __init__
# 需要導入模塊: from rectangle import Rectangle [as 別名]
# 或者: from rectangle.Rectangle import __init__ [as 別名]
def __init__(self, index, x, y, width, height):
self.index = index
self.state = ' '
Rectangle.__init__(self, x, y, width, height)