1 |
# Copyright (C) 2004-2005 Paul Cochrane |
2 |
# |
3 |
# This program is free software; you can redistribute it and/or |
4 |
# modify it under the terms of the GNU General Public License |
5 |
# as published by the Free Software Foundation; either version 2 |
6 |
# of the License, or (at your option) any later version. |
7 |
# |
8 |
# This program is distributed in the hope that it will be useful, |
9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 |
# GNU General Public License for more details. |
12 |
# |
13 |
# You should have received a copy of the GNU General Public License |
14 |
# along with this program; if not, write to the Free Software |
15 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
16 |
|
17 |
# $Id: text.py,v 1.9 2005/03/07 07:45:48 paultcochrane Exp $ |
18 |
|
19 |
## @file text.py |
20 |
|
21 |
""" |
22 |
Class and functions associated with a pyvisi Text object |
23 |
""" |
24 |
|
25 |
# generic imports |
26 |
from pyvisi.common import debugMsg |
27 |
|
28 |
from pyvisi.item import Item |
29 |
|
30 |
__revision__ = '$Revision: 1.9 $' |
31 |
|
32 |
class Text(Item): |
33 |
""" |
34 |
Text |
35 |
""" |
36 |
def __init__(self, scene): |
37 |
""" |
38 |
Initialisation of the Text object |
39 |
|
40 |
@param scene: The scene with which to associate the text |
41 |
@type scene: Scene object |
42 |
""" |
43 |
Item.__init__(self) |
44 |
debugMsg("Called Text.__init__()") |
45 |
|
46 |
self.font = "Times" |
47 |
|
48 |
if scene is None: |
49 |
raise ValueError, "You must specify a scene object" |
50 |
|
51 |
def setFont(self, font): |
52 |
""" |
53 |
Set the current font |
54 |
|
55 |
@param font: the font to set |
56 |
@type font: string |
57 |
""" |
58 |
self.font = font |
59 |
return |
60 |
|
61 |
def getFont(self): |
62 |
""" |
63 |
Get the current font |
64 |
""" |
65 |
return self.font |
66 |
|
67 |
# vim: expandtab shiftwidth=4: |