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 |
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) |
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 |
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): |