6 |
from gzz import * |
from gzz import * |
7 |
from gzz.impl import * |
from gzz.impl import * |
8 |
from gzz.modules.pp2 import * |
from gzz.modules.pp2 import * |
9 |
|
from gzz.modules.pp import PPDims |
10 |
from java.io import File |
from java.io import File |
11 |
from gzz.media.impl import * |
from gzz.media.impl import * |
12 |
|
|
13 |
|
from gzz.view import * |
14 |
|
from gzz.view.buoy import * |
15 |
|
|
16 |
# probably not needed |
# probably not needed |
|
# |
|
|
#from gzz.view import * |
|
17 |
#import math |
#import math |
18 |
#from java.lang import Math |
#from java.lang import Math |
19 |
#from java.awt.event import MouseEvent |
#from java.awt.event import MouseEvent |
91 |
self.d = PPDims(self.space) |
self.d = PPDims(self.space) |
92 |
self.avc.setAccursed(self.space.getHomeCell().s(self.d.d1)) |
self.avc.setAccursed(self.space.getHomeCell().s(self.d.d1)) |
93 |
|
|
94 |
|
else: |
95 |
|
print 'NOT WORK!!!!' |
96 |
|
#System.exit(1) |
97 |
|
|
98 |
|
print 'fooo' |
99 |
|
self.ppv = None #PPViewNG(self.space, self.ppactions) |
100 |
|
print 'bar' |
101 |
|
|
102 |
|
# Create the view.. |
103 |
|
self.adaptor = BuoyAdaptor() |
104 |
|
self.adaptor.cellNodes = [PPCanvasNode(self.d, self.space, self.avc, w)] |
105 |
|
self.adaptor.cellLinkers = [PPLinker(self.d.clone, self.d.association)] |
106 |
|
|
107 |
|
print 'foo' |
108 |
|
|
109 |
|
|
110 |
# make first render by giving a frame into buoy.. |
def scene(self, vs): |
111 |
mainctr = vs.translateCS(0, "MAINVPCTR", |
mainNode = self.adaptor.createMainNode(None, self.avc.getAccursed(), self.ppv) |
112 |
centerX(vs), mainY + mainHeight/2); |
mainNode.renderMain(vs, 0) |
|
|
|
|
frameCS = vs.orthoBoxCS(mainctr, "MAINVP", 10, |
|
|
(-mainWidth)/2, -mainHeight/2, 1, 1, |
|
|
mainWidth, mainHeight); |
|
|
vs.activate(frameCS); |
|
|
|
|
|
# cell to frame CS |
|
|
int c2fCS = vs.coords.ortho(0, 0, 0, 0, 10, 10); |
|
|
vs.matcher.add(frameCS, c2fCS, "C2F"); |
|
|
|
|
|
# make a PPCanvasNode |
|
|
pp_mainvp = PPCanvasNode() |
|
113 |
|
|
|
# and call it with cs. |
|
|
pp_mainvp.renderBuoy(vs, frameCS, self.avc.getAccursed(), null) |
|
114 |
|
|
|
def centerX(self, vs): |
|
|
return vs.size.width()/2 |
|
|
|
|
115 |
|
|
116 |
currentScene = RealPPBuoyViewManager() |
currentScene = RealPPBuoyViewManager() |