/[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 847 - (show annotations)
Thu Sep 14 07:54:04 2006 UTC (12 years, 11 months ago) by jongui
File MIME type: text/x-python
File size: 550 byte(s)
Added vtkTextProperty to control the style of text and partially completed the carpet module.

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

  ViewVC Help
Powered by ViewVC 1.1.26