[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gzz/view xubuoy.py
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz/gzz/view xubuoy.py |
Date: |
Sat, 19 Oct 2002 10:28:06 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/10/19 10:28:06
Modified files:
gzz/view : xubuoy.py
Log message:
Fixes: make work again, use proper buoys. Much better
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/xubuoy.py.diff?tr1=1.23&tr2=1.24&r1=text&r2=text
Patches:
Index: gzz/gzz/view/xubuoy.py
diff -c gzz/gzz/view/xubuoy.py:1.23 gzz/gzz/view/xubuoy.py:1.24
*** gzz/gzz/view/xubuoy.py:1.23 Fri Oct 4 02:54:11 2002
--- gzz/gzz/view/xubuoy.py Sat Oct 19 10:28:06 2002
***************
*** 74,80 ****
End
Enable TEXTURE_2D
""" % { "w": screensize[0], "h": screensize[1] } ) )
! fps = vs.coords.coordsys(0, 10, 10, 20, 1.5, 1.5)
vs.matcher.add(fps, "FPS")
vs.map.put(fps_text, fps, 0)
--- 74,80 ----
End
Enable TEXTURE_2D
""" % { "w": screensize[0], "h": screensize[1] } ) )
! fps = vs.coords.ortho(0, 10, 10, 20, 1.5, 1.5)
vs.matcher.add(fps, "FPS")
vs.map.put(fps_text, fps, 0)
***************
*** 100,106 ****
def puttext(cell, vs, cs, scale):
w = DEFAULT_TEXT_WIDTH * scale
h = contview.getHeight(cell, w, scale)
! cs_t = vs.coords.translateXY(cs, -w/2.0, -h/2.0)
vs.matcher.add(cs, cell.getId()+"__text")
cellview.place(cell, vs, cs_t, w, h, emptyContext, scale)
--- 100,106 ----
def puttext(cell, vs, cs, scale):
w = DEFAULT_TEXT_WIDTH * scale
h = contview.getHeight(cell, w, scale)
! cs_t = vs.coords.translate(cs, -w/2.0, -h/2.0)
vs.matcher.add(cs, cell.getId()+"__text")
cellview.place(cell, vs, cs_t, w, h, emptyContext, scale)
***************
*** 164,177 ****
else:
mainpoint = (0, 0)
! main_end_cs = vs.coords.coordsys(maincs, -20, mainpoint[0],
mainpoint[1], 0, 0)
! src = array([mainpoint[0], mainpoint[1], 0], 'f')
! dst = zeros(3, 'f')
! vs.coords.transformPoints3(maincs, src, dst)
!
! cs1 = floater.addBuoy(dst[0], dst[1],
! importance, self.cell.getId(), 0, 0)
# Then, make the buoy coordsys
--- 164,172 ----
else:
mainpoint = (0, 0)
! main_end_cs = vs.coords.ortho(maincs, -20, mainpoint[0],
mainpoint[1], 0, 0)
! cs1 = floater.buoyCoordsys(main_end_cs, self.cell.getId())
# Then, make the buoy coordsys
***************
*** 183,190 ****
cs1_zoom= vs.coords.distort(cs1, 0, 0, self.eye, self.eye,
self.buoyscale, self.buoyscale)
vs.matcher.add(cs1_zoom, cell.getId()+"__bulg")
! cs1_trans = vs.coords.translateXY(cs1_zoom, -self.pctr[0],
-self.pctr[1])
! # cs1_trans = vs.coords.translateXY(cs1_zoom, 0, 0)
vs.matcher.add(cs1_trans, cell.getId()+"__trans")
self.cliprect = (self.p0[0], self.p0[1], self.p1[0], self.p1[1])
--- 178,185 ----
cs1_zoom= vs.coords.distort(cs1, 0, 0, self.eye, self.eye,
self.buoyscale, self.buoyscale)
vs.matcher.add(cs1_zoom, cell.getId()+"__bulg")
! cs1_trans = vs.coords.translate(cs1_zoom, -self.pctr[0],
-self.pctr[1])
! # cs1_trans = vs.coords.translate(cs1_zoom, 0, 0)
vs.matcher.add(cs1_trans, cell.getId()+"__trans")
self.cliprect = (self.p0[0], self.p0[1], self.p1[0], self.p1[1])
***************
*** 194,205 ****
# Then, the xu link connector
! link_end_cs = vs.coords.coordsys(cs1_trans, -20, self.pctr[0],
self.pctr[1], 0, 0)
else:
puttext(cell, vs, cs1, 1.2)
! link_end_cs = vs.coords.coordsys(cs1, -20, 0, 0, 0, 0)
vs.matcher.add(main_end_cs, "link"+str(self.link)+str(self.linkindex))
vs.matcher.add(link_end_cs, "link"+str(self.link)+str(1-self.linkindex))
--- 189,200 ----
# Then, the xu link connector
! link_end_cs = vs.coords.ortho(cs1_trans, -20, self.pctr[0],
self.pctr[1], 0, 0)
else:
puttext(cell, vs, cs1, 1.2)
! link_end_cs = vs.coords.ortho(cs1, -20, 0, 0, 0, 0)
vs.matcher.add(main_end_cs, "link"+str(self.link)+str(self.linkindex))
vs.matcher.add(link_end_cs, "link"+str(self.link)+str(1-self.linkindex))
***************
*** 279,285 ****
self.ctrx = screensize[0]/2
self.ctry = screensize[1]/2
! self.rad = screensize[0] * 5/11
self.nadir = NadirAngler(self.ctrx, screensize[1]*2)
self.clip = 0
--- 274,280 ----
self.ctrx = screensize[0]/2
self.ctry = screensize[1]/2
! self.rad = screensize[0] * 5/12
self.nadir = NadirAngler(self.ctrx, screensize[1]*2)
self.clip = 0
***************
*** 497,508 ****
# self.rad, projx, self.ctry, 0)
# vs.matcher.add(cs1, self.cursor.getId()+"__buo")
! projdist = 1.5*self.rad
! bf = effects.NadirCircleFloater(vs, (self.ctrx, self.ctry),
! self.rad, (self.ctrx - projdist, self.ctry), self.nadir)
! bfforw = effects.NadirCircleFloater(vs, (self.ctrx, self.ctry),
! self.rad, (self.ctrx + projdist, self.ctry), self.nadir)
cs1 = bf.addCentralBuoy(self.cursor.getId())
--- 492,503 ----
# self.rad, projx, self.ctry, 0)
# vs.matcher.add(cs1, self.cursor.getId()+"__buo")
! projdist = self.rad
! bf = effects.CircleFloater4(vs, 0, (self.ctrx, self.ctry),
! self.rad, (self.ctrx - projdist, self.ctry))
! bfforw = effects.CircleFloater4(vs, 0, (self.ctrx, self.ctry),
! self.rad, (self.ctrx + projdist, self.ctry))
cs1 = bf.addCentralBuoy(self.cursor.getId())
***************
*** 521,527 ****
eye, eye, *(self.modes[0].mag))
vs.matcher.add(cs1_zoom, self.cursor.getId()+"__bulg")
! cs1_trans = vs.coords.translateXY(cs1_zoom,
-globalx, -globaly + focusy_at)
vs.matcher.add(cs1_trans, self.cursor.getId()+"__trans")
--- 516,522 ----
eye, eye, *(self.modes[0].mag))
vs.matcher.add(cs1_zoom, self.cursor.getId()+"__bulg")
! cs1_trans = vs.coords.translate(cs1_zoom,
-globalx, -globaly + focusy_at)
vs.matcher.add(cs1_trans, self.cursor.getId()+"__trans")
- [Gzz-commits] gzz/gzz/view xubuoy.py, Tuomas J. Lukka, 2002/10/03
- [Gzz-commits] gzz/gzz/view xubuoy.py, Benja Fallenstein, 2002/10/03
- [Gzz-commits] gzz/gzz/view xubuoy.py, Tuomas J. Lukka, 2002/10/03
- [Gzz-commits] gzz/gzz/view xubuoy.py, Tuomas J. Lukka, 2002/10/03
- [Gzz-commits] gzz/gzz/view xubuoy.py, Benja Fallenstein, 2002/10/03
- [Gzz-commits] gzz/gzz/view xubuoy.py, Benja Fallenstein, 2002/10/03
- [Gzz-commits] gzz/gzz/view xubuoy.py, Benja Fallenstein, 2002/10/03
- [Gzz-commits] gzz/gzz/view xubuoy.py,
Tuomas J. Lukka <=
- [Gzz-commits] gzz/gzz/view xubuoy.py, Tuomas J. Lukka, 2002/10/20
- [Gzz-commits] gzz/gzz/view xubuoy.py, Tuomas J. Lukka, 2002/10/28