本文整理汇总了Python中BaseWidget.BaseWidget.draw方法的典型用法代码示例。如果您正苦于以下问题:Python BaseWidget.draw方法的具体用法?Python BaseWidget.draw怎么用?Python BaseWidget.draw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseWidget.BaseWidget
的用法示例。
在下文中一共展示了BaseWidget.draw方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: draw
# 需要导入模块: from BaseWidget import BaseWidget [as 别名]
# 或者: from BaseWidget.BaseWidget import draw [as 别名]
def draw (self):
"""I.draw () -> None
Draws the ImageMap surface and places its picture on it.
"""
BaseWidget.draw (self)
rect = self.picture.get_rect ()
rect.center = self.image.get_rect ().center
self.image.blit (self.picture, rect)
示例2: draw
# 需要导入模块: from BaseWidget import BaseWidget [as 别名]
# 或者: from BaseWidget.BaseWidget import draw [as 别名]
def draw (self):
"""P.draw () -> None
Draws the ProgressBar surface and places its text on it.
"""
BaseWidget.draw (self)
if self.text:
sf_text = base.GlobalStyle.engine.draw_string (self.text,
self.state,
self.__class__,
self.style)
rect = sf_text.get_rect ()
rect.center = self.image.get_rect ().center
self.image.blit (sf_text, rect)
示例3: draw
# 需要导入模块: from BaseWidget import BaseWidget [as 别名]
# 或者: from BaseWidget.BaseWidget import draw [as 别名]
def draw (self):
"""I.draw () -> None
Draws the ImageLabel surface and places its picture on it.
"""
BaseWidget.draw (self)
rect_img = None
rect_child = None
rect = self.image.get_rect ()
rect_img = self.picture.get_rect ()
rect_img.center = rect.center
rect_img.centery = rect.centery
self.image.blit (self.picture, rect_img)