本文整理汇总了Python中thorpy.elements.element.Element.set_painter方法的典型用法代码示例。如果您正苦于以下问题:Python Element.set_painter方法的具体用法?Python Element.set_painter怎么用?Python Element.set_painter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thorpy.elements.element.Element
的用法示例。
在下文中一共展示了Element.set_painter方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: set_painter
# 需要导入模块: from thorpy.elements.element import Element [as 别名]
# 或者: from thorpy.elements.element.Element import set_painter [as 别名]
def set_painter(self, painter, autopress=True):
"""To use before finish"""
Element.set_painter(self, painter)
if autopress:
painter = copy(painter)
painter.pressed = True
self.press_params.params["painter"] = painter
示例2: _get_file_element
# 需要导入模块: from thorpy.elements.element import Element [as 别名]
# 或者: from thorpy.elements.element.Element import set_painter [as 别名]
def _get_file_element(self, name):
painter = functions.obtain_valid_painter(painterstyle.NAME_PAINTER,
size=style.SIZE)
el = Element(name)
el.set_painter(painter)
el.set_style(style.STYLE_NAME)
el.finish()
return el
示例3: _get_value_element
# 需要导入模块: from thorpy.elements.element import Element [as 别名]
# 或者: from thorpy.elements.element.Element import set_painter [as 别名]
def _get_value_element(self, valuestyle):
painter = functions.obtain_valid_painter(
painterstyle.CHECKER_VALUE_PAINTER,
size=style.CHECK_SIZE)
el = Element(str(self.get_value()))
el.set_painter(painter)
if valuestyle:
el.set_style(valuestyle)
el.finish()
return el
示例4: _get_name_element
# 需要导入模块: from thorpy.elements.element import Element [as 别名]
# 或者: from thorpy.elements.element.Element import set_painter [as 别名]
def _get_name_element(self, name, namestyle):
painter = functions.obtain_valid_painter(
painterstyle.CHECKER_NAME_PAINTER,
size=style.SIZE)
el = Element(name)
el.set_painter(painter)
if namestyle:
el.set_style(namestyle)
el.finish()
return el
示例5: _get_example_element
# 需要导入模块: from thorpy.elements.element import Element [as 别名]
# 或者: from thorpy.elements.element.Element import set_painter [as 别名]
def _get_example_element(self):
color = self.get_color()
painter_frame = functions.obtain_valid_painter(painterstyle.DEF_PAINTER,
pressed=True,
size=self._color_size)
if painter_frame.clip:
color_size = painter_frame.clip.size
else:
color_size = self._color_size
painter_example = BasicFrame(size=color_size, color=color)
example = Element()
example.set_painter(painter_example)
example.finish()
frame = Element(elements=[example])
frame.set_painter(painter_frame)
frame.finish()
example.set_center(frame.get_fus_center())
return frame