9 |
screenctr = (0.9 * screensize[0]/2, screensize[1]/2) |
screenctr = (0.9 * screensize[0]/2, screensize[1]/2) |
10 |
|
|
11 |
# Slow animation for the demo. |
# Slow animation for the demo. |
12 |
AbstractUpdateManager.defaultAnimationTime = 3000 |
AbstractUpdateManager.defaultAnimationTime = 2000 |
13 |
AbstractUpdateManager.fractCalc = AbstractUpdateManager.LinearCalculator() |
AbstractUpdateManager.fractCalc = AbstractUpdateManager.LinearCalculator() |
14 |
|
|
15 |
from test.tools import tools |
from test.tools import tools |
365 |
|
|
366 |
class XuPDFScene_PDFZoom: |
class XuPDFScene_PDFZoom: |
367 |
def __init__(self): |
def __init__(self): |
368 |
self.mag = [10, 0.4] |
self.mag = [(screensize[1]/2,screensize[1]/2),(screensize[1]*2,20)] |
369 |
def key(self, key): |
def key(self, key): |
370 |
print "Key: ",key |
print "Key: ",key |
371 |
global currentScene |
global currentScene |
390 |
cs1 = bf.addCentralBuoy(globalcursor.getId()) |
cs1 = bf.addCentralBuoy(globalcursor.getId()) |
391 |
# cs1_zoom = vs.coords.affineCoordsys(cs1, 0, 0, 0, |
# cs1_zoom = vs.coords.affineCoordsys(cs1, 0, 0, 0, |
392 |
# 100, 0, 0, 100) |
# 100, 0, 0, 100) |
393 |
eye = 0.5 |
eye = 0.2 |
394 |
cs1_zoom= vs.coords.distort(cs1, 0, 0, eye, eye, 700, 20) |
cs1_zoom= vs.coords.distort(cs1, 0, 0, eye, eye, |
395 |
|
*(self.mag[0])) |
396 |
vs.matcher.add(cs1_zoom, globalcursor.getId()+"__bulg") |
vs.matcher.add(cs1_zoom, globalcursor.getId()+"__bulg") |
397 |
cs1_trans = vs.coords.translateXY(cs1_zoom, -globalx, -globaly) |
cs1_trans = vs.coords.translateXY(cs1_zoom, -globalx, -globaly) |
398 |
vs.matcher.add(cs1_trans, globalcursor.getId()+"__trans") |
vs.matcher.add(cs1_trans, globalcursor.getId()+"__trans") |