/[escript]/trunk/pyvisi/py_src/examples/text.py
ViewVC logotype

Contents of /trunk/pyvisi/py_src/examples/text.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1038 - (show annotations)
Fri Mar 16 05:15:37 2007 UTC (12 years, 5 months ago) by jongui
File MIME type: text/x-python
File size: 746 byte(s)
Added more examples.
1 from esys.pyvisi import Scene, Text2D, LocalPosition
2 from esys.pyvisi.constant import *
3
4 s = Scene(renderer = Renderer.ONLINE, num_viewport = 4, x_size = 800,
5 y_size = 600)
6
7 # Create one 2D text instance for the first viewport.
8 t1 = Text2D(scene = s, viewport = Viewport.SOUTH_WEST, text = "VTK ...")
9 t1.setPosition(LocalPosition(x_coor = 20, y_coor = 30))
10 t1.setColor(color = Color.BLUE)
11 t1.setFontSize(size = 20)
12 t1.boldOn()
13
14 # Create one 2D text instance for the third viewport.
15 t2 = Text2D(scene = s, viewport = Viewport.NORTH_EAST,
16 text = "PYTHON ...\n MESH")
17 t2.setPosition(LocalPosition(x_coor = 20, y_coor = 30))
18 t2.setColor(color = Color.PURPLE)
19 t2.setFontSize(size = 50)
20 t2.setFontToArial()
21 t2.shadowOn()
22
23 s.render()
24

  ViewVC Help
Powered by ViewVC 1.1.26