Parent Directory
|
Revision Log
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 |