summaryrefslogtreecommitdiff
path: root/src/samples/wordspos.py
blob: 85a8ceb183cb33cc1f1f8a96c5ce707cf67eb1ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from libavg import avg, player

canvas = player.createMainCanvas(size=(160,120))
rootNode = canvas.getRootNode()
avg.WordsNode(pos=(10,10), width=70, text="<i>Left-justified paragraph</i>",
        parent=rootNode)
avg.WordsNode(pos=(150,10), width=70, alignment="right", text="Right-justified paragraph",
        parent=rootNode)
avg.WordsNode(pos=(80,80), width=70, alignment="center", text="Centered paragraph",
        parent=rootNode)
player.play()