gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz gfx/libutil/effects.py gzz/view/xubuoy.py


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz gfx/libutil/effects.py gzz/view/xubuoy.py
Date: Thu, 03 Oct 2002 13:30:09 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/10/03 13:30:09

Modified files:
        gfx/libutil    : effects.py 
        gzz/view       : xubuoy.py 

Log message:
        Fix some context bugs

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libutil/effects.py.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/xubuoy.py.diff?tr1=1.14&tr2=1.15&r1=text&r2=text

Patches:
Index: gzz/gfx/libutil/effects.py
diff -c gzz/gfx/libutil/effects.py:1.13 gzz/gfx/libutil/effects.py:1.14
*** gzz/gfx/libutil/effects.py:1.13     Thu Oct  3 13:19:19 2002
--- gzz/gfx/libutil/effects.py  Thu Oct  3 13:30:08 2002
***************
*** 48,54 ****
        vs = self.vs
        cs1 = vs.coords.affineCoordsys(0, 50, b[0], b[1], size, 0, 0, size)
        vs.matcher.add(cs1, str(key)+"_buo_1")
!       cs2 = vs.coords.rotateXY(cs1, 360 * self.nadir.getAngleRad(b[0], b[1]) 
/ (2 * math.pi))
        vs.matcher.add(cs2,str(key)+"_buo_2")
        return cs2
  
--- 48,54 ----
        vs = self.vs
        cs1 = vs.coords.affineCoordsys(0, 50, b[0], b[1], size, 0, 0, size)
        vs.matcher.add(cs1, str(key)+"_buo_1")
!       cs2 = vs.coords.rotateXY(cs1, -360 * self.nadir.getAngleRad(b[0], b[1]) 
/ (2 * math.pi))
        vs.matcher.add(cs2,str(key)+"_buo_2")
        return cs2
  
Index: gzz/gzz/view/xubuoy.py
diff -c gzz/gzz/view/xubuoy.py:1.14 gzz/gzz/view/xubuoy.py:1.15
*** gzz/gzz/view/xubuoy.py:1.14 Thu Oct  3 13:19:19 2002
--- gzz/gzz/view/xubuoy.py      Thu Oct  3 13:30:09 2002
***************
*** 39,46 ****
        font = GL.createFont("gfx/fonts/a010013l.pfb", 16);
      return font
  
- globalspan = None
- 
  # Paper coordinates of current focus
  globalx = 0
  globaly = 0
--- 39,44 ----
***************
*** 108,114 ****
      def add(self, vs, importance, floater, 
                        maincs, globalview = None,
                        globalusefancypaper = 0,
!                       globalshowtessel = 0):
        if not self.cell:
            return
        cell = self.cell
--- 106,113 ----
      def add(self, vs, importance, floater, 
                        maincs, globalview = None,
                        globalusefancypaper = 0,
!                       globalshowtessel = 0,
!                       globalspan = None):
        if not self.cell:
            return
        cell = self.cell
***************
*** 126,132 ****
  
        main_end_cs = vs.coords.coordsys(maincs, -20, mainpoint[0], 
mainpoint[1], 0, 0)
  
!       cs1 = floater.addBuoy(mainpoint[0], mainpoint[1], 
                importance, self.cell.getId(), 0, 0)
  
  
--- 125,135 ----
  
        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)
  
  
***************
*** 205,211 ****
        self.win = win
        self.modes = [
                Mode(
!                   mag=(screensize[1]*1.6,screensize[1]/10),
                    context=1,
                    movefocus=0,
                    eye = 0.2,
--- 208,214 ----
        self.win = win
        self.modes = [
                Mode(
!                   mag=(screensize[1]*1.6,screensize[1]/40),
                    context=1,
                    movefocus=0,
                    eye = 0.2,
***************
*** 227,233 ****
        self.ctrx = screensize[0]/2
        self.ctry = screensize[1]/2
  
!       self.rad = screensize[1] /  2
  
        self.nadir = NadirAngler(self.ctrx, screensize[1]*2)
        self.clip = 0
--- 230,236 ----
        self.ctrx = screensize[0]/2
        self.ctry = screensize[1]/2
  
!       self.rad = screensize[0] /  2
  
        self.nadir = NadirAngler(self.ctrx, screensize[1]*2)
        self.clip = 0
***************
*** 301,311 ****
                  y = int(min(c1[2], c2[2]))
                  h = int(max(c1[2], c2[2]) - y)
                  print "Area:", (page, page+1, x, y, w, h)
!                 span = globalspan.subArea(page, page+1, x, y, w, h)
              else:
                  p0 = min(c1[0], c2[0])
                  p1 = max(c1[0], c2[0])
!                 span = globalspan.subSpan(p0, p1+1)
                  
              print "Marking span: %s" % (span,)
                  
--- 304,314 ----
                  y = int(min(c1[2], c2[2]))
                  h = int(max(c1[2], c2[2]) - y)
                  print "Area:", (page, page+1, x, y, w, h)
!                 span = self.span.subArea(page, page+1, x, y, w, h)
              else:
                  p0 = min(c1[0], c2[0])
                  p1 = max(c1[0], c2[0])
!                 span = self.span.subSpan(p0, p1+1)
                  
              print "Marking span: %s" % (span,)
                  
***************
*** 383,389 ****
  
      def moveToCell(self, cell, nx=1, ny=1, redraw=1):
        global globalx, globaly
!       global globalforw, globalback, globalspan
  
        # Check type
        if 1: # PDF
--- 386,392 ----
  
      def moveToCell(self, cell, nx=1, ny=1, redraw=1):
        global globalx, globaly
!       global globalforw, globalback
  
        # Check type
        if 1: # PDF
***************
*** 393,399 ****
        globalx, globaly = nx, ny
  
        content = cell.space.cellTexter.getEnfilade(cell, None)
!       globalspan = enf2span(content)
        xuindexer = gzz.index.IndexManager.getXuIndexer(self.linkspace)
        globalforw = xuindexer.getForwardIndex().getMatches(content)
        globalback = xuindexer.getBackwardIndex().getMatches(content)
--- 396,402 ----
        globalx, globaly = nx, ny
  
        content = cell.space.cellTexter.getEnfilade(cell, None)
!       self.span = enf2span(content)
        xuindexer = gzz.index.IndexManager.getXuIndexer(self.linkspace)
        globalforw = xuindexer.getForwardIndex().getMatches(content)
        globalback = xuindexer.getBackwardIndex().getMatches(content)
***************
*** 451,457 ****
            clip = (-0.2+globalx, -0.2+globaly, 0.2+globalx, 0.2+globaly)
            self.cliprect = clip
        else:
!           w = self.view.papersize[0]
            extrax = 0.1
            extray = 0.1
            clip = (0-extrax, -extray, w+extrax, 1+extray)
--- 454,460 ----
            clip = (-0.2+globalx, -0.2+globaly, 0.2+globalx, 0.2+globaly)
            self.cliprect = clip
        else:
!           w = self.view.scaledsize[0]
            extrax = 0.1
            extray = 0.1
            clip = (0-extrax, -extray, w+extrax, 1+extray)
***************
*** 472,478 ****
                b.add(vs, 1, bfforw, maincs = cs1_trans,
                        globalview = self.view,
                        globalusefancypaper = self.usefancypaper,
!                       globalshowtessel = self.showtessel)
                self.buoys.append(b)
            for backlink in globalback:
                b = XuPDFBuoy(0,(getattr(backlink,"from"), backlink.to),
--- 475,482 ----
                b.add(vs, 1, bfforw, maincs = cs1_trans,
                        globalview = self.view,
                        globalusefancypaper = self.usefancypaper,
!                       globalshowtessel = self.showtessel,
!                       globalspan = self.span)
                self.buoys.append(b)
            for backlink in globalback:
                b = XuPDFBuoy(0,(getattr(backlink,"from"), backlink.to),
***************
*** 480,486 ****
                b.add(vs, 1, bf, maincs = cs1_trans,
                        globalview = self.view,
                        globalusefancypaper = self.usefancypaper,
!                       globalshowtessel = self.showtessel)
                self.buoys.append(b)
        self.currentvs = vs
        self.selectCS = None
--- 484,491 ----
                b.add(vs, 1, bf, maincs = cs1_trans,
                        globalview = self.view,
                        globalusefancypaper = self.usefancypaper,
!                       globalshowtessel = self.showtessel,
!                       globalspan = self.span)
                self.buoys.append(b)
        self.currentvs = vs
        self.selectCS = None




reply via email to

[Prev in Thread] Current Thread [Next in Thread]