1 |
""" |
2 |
Class and functions associated with a pyvisi Text object |
3 |
|
4 |
@var __author__: name of author |
5 |
@var __license__: licence agreement |
6 |
@var __copyright__: copyrights |
7 |
@var __url__: url entry point on documentation |
8 |
@var __version__: version |
9 |
@var __date__: date of the version |
10 |
""" |
11 |
|
12 |
__copyright__=""" Copyright (c) 2006 by ACcESS MNRF |
13 |
http://www.access.edu.au |
14 |
Primary Business: Queensland, Australia""" |
15 |
__license__="""Licensed under the Open Software License version 3.0 |
16 |
http://www.opensource.org/licenses/osl-3.0.php""" |
17 |
__author__="Paul Cochrane" |
18 |
__url__="http://www.iservo.edu.au/esys" |
19 |
__version__="$Revision$" |
20 |
__date__="$Date$" |
21 |
|
22 |
|
23 |
# generic imports |
24 |
from common import debugMsg |
25 |
|
26 |
from item import Item |
27 |
|
28 |
class Text(Item): |
29 |
""" |
30 |
Text |
31 |
""" |
32 |
def __init__(self, scene): |
33 |
""" |
34 |
Initialisation of the Text object |
35 |
|
36 |
@param scene: The scene with which to associate the text |
37 |
@type scene: Scene object |
38 |
""" |
39 |
Item.__init__(self) |
40 |
debugMsg("Called Text.__init__()") |
41 |
|
42 |
self.font = "Times" |
43 |
|
44 |
if scene is None: |
45 |
raise ValueError, "You must specify a scene object" |
46 |
|
47 |
def setFont(self, font): |
48 |
""" |
49 |
Set the current font |
50 |
|
51 |
@param font: the font to set |
52 |
@type font: string |
53 |
""" |
54 |
self.font = font |
55 |
return |
56 |
|
57 |
def getFont(self): |
58 |
""" |
59 |
Get the current font |
60 |
""" |
61 |
return self.font |
62 |
|
63 |
# vim: expandtab shiftwidth=4: |