File: labels.py

package info (click to toggle)
python-visual 1%3A5.12-1.6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 7,708 kB
  • ctags: 7,635
  • sloc: cpp: 15,593; sh: 9,615; ansic: 6,631; python: 4,737; makefile: 384
file content (12 lines) | stat: -rw-r--r-- 493 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
from visual import *

x = arrow( color=color.red)

tip = label( text="tip", space=0.2, pos=(1,0), opacity=0.5)
tail = label( text="tail", xoffset=20, yoffset=10, opacity=0.5)
midp = label( text="a\nmidpoint", xoffset=10, yoffset=20, pos=(.5,0), opacity=0.5)

print """You should see a single arrow with three labels attached to it.
Each label is translucent. The one at the tip should be centered at
the tip. The head and tail labels have a single line of text.
The midpoint label has two."""