/[escript]/trunk/pyvisi/py_src/style.py
ViewVC logotype

Contents of /trunk/pyvisi/py_src/style.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 849 - (show annotations)
Fri Sep 15 07:11:55 2006 UTC (14 years, 2 months ago) by jongui
File MIME type: text/x-python
File size: 543 byte(s)
Optimized codes and modularized functions to make it more scalable. Partially 
integrated carpet into the existing modules.  

1
2 import vtk
3 from constants import *
4
5 class Style:
6
7 def __init__(self):
8 self.vtk_text_property = vtk.vtkTextProperty()
9
10 def setFontFamily(self, family):
11 eval("self.vtk_text_property.SetFontFamilyTo%s()" % family)
12
13 def setBold(self):
14 self.vtk_text_property.BoldOn()
15
16 def setItalic(self):
17 self.vtk_text_property.ItalicOn()
18
19 def setShadow(self):
20 self.vtk_text_property.ShadowOn()
21
22 def setColor(self, color):
23 self.vtk_text_property.SetColor(color[0], color[1],
24 color[2])
25
26 def getStyle(self):
27 return self.vtk_text_property
28

  ViewVC Help
Powered by ViewVC 1.1.26