예제 #1
0
def add_text(obj, position, text, width=None, color=(0, 0, 0)):
    if width is None:
        width = 0.02 * len(text)
    t = mlab.text(x=position[0],
                  y=position[1],
                  text=text,
                  z=position[2],
                  color=color,
                  width=width)
    return t
예제 #2
0
파일: viewer.py 프로젝트: snilek/sfepy
def add_text(obj, position, text, width=None, color=(0, 0, 0)):
    if width is None:
        width = 0.02 * len(text)
    t = mlab.text(x=position[0], y=position[1], text=text,
                  z=position[2], color=color, width=width)
    return t