示例#1
0
文件: main.py 项目: tailhook/pyzza
 def __init__(self):
     self.layout = Layout([
         Field(level, 'field', {
             'normal': State.parse(
             'normal:(0,0)-(1,1)'),
             }),
         ])
     super().__init__()
     Frame.start(self, True)
     Keys.start(self.stage)
     self.layout.mapping.field.start()
示例#2
0
文件: main.py 项目: tailhook/pyzza
 def __init__(self):
     fmt = ElementFormat(None, 14, 0x000000)
     data = RectangleData(testdata)
     self.layout = Layout([
         LineChart(data, Style(), 'chart', {
             'normal': State.parse(
             'normal:(0,0+40+40)-(1,1-40-40)[100-,50-]'),
             }),
         BottomHorizontalAxis(data, 'xaxis', {
             'normal': State.parse(
             'normal:<chart>(0,1)-(1,1+0+20)'),
             }),
         LeftVerticalAxis(data, 'yaxis', {
             'normal': State.parse(
             'normal:<chart>(0,0-20+0)-(0,1)'),
             }),
         CenteredLine(fmt, "Some test data", 'title', {
             'normal': State.parse(
             'normal:<chart>(0,0-30)-(1,0)')
             }),
         ])
     super().__init__()