/[gzz]/gzz/gfx/demo/keymap-test.py
ViewVC logotype

Diff of /gzz/gfx/demo/keymap-test.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by mudyc, Thu Jan 9 09:42:25 2003 UTC revision 1.6 by mudyc, Mon Jan 13 08:01:17 2003 UTC
# Line 3  from gzz.view import View Line 3  from gzz.view import View
3    
4  from java.awt.event import *  from java.awt.event import *
5    
6    from gzz.gfx.gl import IrregularFrame
7    
8  class ViewScene:  class ViewScene:
9      def __init__(self):      def __init__(self):
10          self.a = 150          self.a = 150
# Line 29  class ViewScene: Line 31  class ViewScene:
31    
32          # Second is nadir          # Second is nadir
33          # text cs          # text cs
34          cs_text = vs.coords.affineCoordsys(0, 10, 50, self.a, tscale, 0, 0, tscale)          cs_text = vs.coords.affineCoordsys(0, 50, 50, self.a, tscale, 0, 0, tscale)
35          vs.matcher.add(cs_text, "TEXT")          vs.matcher.add(cs_text, "TEXT")
36          # nadir point          # nadir point
37          nadir_point = vs.coords.ortho(0,0, self.x,self.y, 1,1)          nadir_point = vs.coords.ortho(0,0, self.x,self.y, 1,1)
# Line 38  class ViewScene: Line 40  class ViewScene:
40          cs_nadir = vs.coords.nadirOrigin(cs_text, nadir_point)          cs_nadir = vs.coords.nadirOrigin(cs_text, nadir_point)
41          vs.matcher.add(cs_nadir, "nadir")          vs.matcher.add(cs_nadir, "nadir")
42    
43          putText(vs, cs_nadir, 'Text Vob', color=(0,0,0), h=4, y = 3)          #putText(vs, cs_nadir, 'Text Vob', color=(0,0,0), h=4, y = 3)
44            f = IrregularFrame.create(-16000,-16000,16000,16000,50, 150, 2)
45            vs.map.put(f.getBlank())
46    
47          self.NEW = cs_text          self.NEW = cs_text
48          # Note how we map the OLD cs2 to the NEW cs1          # Note how we map the OLD cs2 to the NEW cs1
# Line 54  class ViewScene: Line 58  class ViewScene:
58    
59      def key(self, k):      def key(self, k):
60          print 'simsalapim!'          print 'simsalapim!'
61          self.vs.matcher.keymapSingleCoordsys(self.cs1, self.cs2)          #self.vs.matcher.keymapSingleCoordsys(self.cs1, self.cs2)
62          self.a = self.a + 5          self.a = self.a + 5
63    
64      def mouse(self, ev):      def mouse(self, ev):

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26