本文整理汇总了Python中pyglet.text.Label.x方法的典型用法代码示例。如果您正苦于以下问题:Python Label.x方法的具体用法?Python Label.x怎么用?Python Label.x使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyglet.text.Label
的用法示例。
在下文中一共展示了Label.x方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: drawLabel
# 需要导入模块: from pyglet.text import Label [as 别名]
# 或者: from pyglet.text.Label import x [as 别名]
def drawLabel(text, pos=(0, 0), center=True, textcolor=(255, 255, 255, 75)):
_standard_label = Label(text="standard Label", font_size=200, bold=True, color=textcolor)
_standard_label.anchor_x = "center"
_standard_label.anchor_y = "center"
_standard_label.x = 0
_standard_label.y = 0
_standard_label.text = text
glPushMatrix()
glTranslated(pos[0], pos[1], 0.0)
glScaled(0.3, 0.3, 1)
_standard_label.draw()
glPopMatrix()
示例2: drawLabel
# 需要导入模块: from pyglet.text import Label [as 别名]
# 或者: from pyglet.text.Label import x [as 别名]
def drawLabel(text, pos=(0,0),center=True):
_standard_label = Label(text='standard Label', font_size=200,bold=True, color=(255,255,255,75))
_standard_label.anchor_x = 'left'
_standard_label.anchor_y = 'bottom'
_standard_label.x = 0
_standard_label.y = 0
_standard_label.text = text
glPushMatrix()
glTranslated(pos[0], pos[1], 0.0)
glScaled(0.3,0.3,1)
_standard_label.draw()
glPopMatrix()
示例3: drawLabel
# 需要导入模块: from pyglet.text import Label [as 别名]
# 或者: from pyglet.text.Label import x [as 别名]
def drawLabel(text, pos=(0,0),center=True,alpha = 75,scale=0.3,red=255,green=255,blue=255):
_standard_label = Label(text='standard Label', font_size=200,bold=True, color=(red,green,blue,alpha))
_standard_label.anchor_x = 'left'
_standard_label.anchor_y = 'bottom'
_standard_label.x = 0
_standard_label.y = 0
_standard_label.text = text
glPushMatrix()
glTranslated(pos[0], pos[1], 0.0)
glScaled(scale,scale,1)
_standard_label.draw()
glPopMatrix()