gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz/gzz mediaserver/MediaserverFiler.java view/...


From: Benja Fallenstein
Subject: [Gzz-commits] gzz/gzz mediaserver/MediaserverFiler.java view/...
Date: Thu, 03 Oct 2002 13:44:47 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Benja Fallenstein <address@hidden>      02/10/03 13:44:47

Modified files:
        gzz/mediaserver: MediaserverFiler.java 
        gzz/view       : xubuoy.py 

Log message:
        Show links from text to pdf

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/mediaserver/MediaserverFiler.java.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/xubuoy.py.diff?tr1=1.15&tr2=1.16&r1=text&r2=text

Patches:
Index: gzz/gzz/mediaserver/MediaserverFiler.java
diff -c gzz/gzz/mediaserver/MediaserverFiler.java:1.11 
gzz/gzz/mediaserver/MediaserverFiler.java:1.12
*** gzz/gzz/mediaserver/MediaserverFiler.java:1.11      Wed Oct  2 13:29:17 2002
--- gzz/gzz/mediaserver/MediaserverFiler.java   Thu Oct  3 13:44:47 2002
***************
*** 116,122 ****
                Version v = diff.applyTo(from);
  
                if(!id.equals(getVersionId(v, headerTo))) {
!                     if(dbg) {
                          pa("============= DIFF ===============");
                          pa(new 
String(CopyUtil.readBytes(diffBlock.getInputStream())));
                          pa("==================================");
--- 116,122 ----
                Version v = diff.applyTo(from);
  
                if(!id.equals(getVersionId(v, headerTo))) {
!                     if(true) {
                          pa("============= DIFF ===============");
                          pa(new 
String(CopyUtil.readBytes(diffBlock.getInputStream())));
                          pa("==================================");
***************
*** 214,220 ****
            fmt.writeVersion(bos, v);
            ms.addDatum(bos.toByteArray(),
                          versionContentType, current);
!             if(dbg) {
                  pa("============ CORRECT =============");
                  pa(new String(bos.toByteArray()));
                  pa("==================================");
--- 214,220 ----
            fmt.writeVersion(bos, v);
            ms.addDatum(bos.toByteArray(),
                          versionContentType, current);
!             if(true) {
                  pa("============ CORRECT =============");
                  pa(new String(bos.toByteArray()));
                  pa("==================================");
Index: gzz/gzz/view/xubuoy.py
diff -c gzz/gzz/view/xubuoy.py:1.15 gzz/gzz/view/xubuoy.py:1.16
*** gzz/gzz/view/xubuoy.py:1.15 Thu Oct  3 13:30:09 2002
--- gzz/gzz/view/xubuoy.py      Thu Oct  3 13:44:47 2002
***************
*** 27,32 ****
--- 27,35 ----
  # center = little above physical center
  screenctr = (0.9 * screensize[0]/2, screensize[1]/2)
  
+ # width for linebreaking text
+ TEXT_WIDTH = 200
+ 
  def enf2span(enf):
      list = enf.getList()
      return list[0]
***************
*** 114,129 ****
  
        # Make a coordinate system at the anchor point.
        # this is the parent coordsys of the buoy
!       mainlinkspan = self.link[1-self.linkindex].getList()[0]
!       # XXX if cell not everything...
!       mainpage = mainlinkspan.offset() - globalspan.offset()
!       mainp = mainlinkspan.getLocation()
!       mainoffsp = globalspan.getLocation()
!       maind = mainlinkspan.getSize()
!       mainpoint = globalview.paperpoint(mainpage,  
mainp.x-mainoffsp.x+0.5*maind.width,
                                                    
mainp.y-mainoffsp.y+0.5*maind.height)
! 
!       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')
--- 117,137 ----
  
        # Make a coordinate system at the anchor point.
        # this is the parent coordsys of the buoy
!         
!         mainlinkspan = self.link[1-self.linkindex].getList()[0]
!         if hasattr(mainlinkspan, 'subArea'):
!           mainlinkspan = self.link[1-self.linkindex].getList()[0]
!           # XXX if cell not everything...
!           mainpage = mainlinkspan.offset() - globalspan.offset()
!           mainp = mainlinkspan.getLocation()
!           mainoffsp = globalspan.getLocation()
!           maind = mainlinkspan.getSize()
!           mainpoint = globalview.paperpoint(mainpage,  
mainp.x-mainoffsp.x+0.5*maind.width,
                                                    
mainp.y-mainoffsp.y+0.5*maind.height)
!         else:
!             mainpoint = (.5, .5)
!             
!         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')
***************
*** 199,204 ****
--- 207,216 ----
      x = list[-1]
      del list[-1]
      list.insert(0, x)
+     
+ def ispdf(cell):
+     # xxx
+     return cell.t().startswith("?")
  
  class XuPDFScene_PDFContext:
      def __init__(self, linkspace, win=None):
***************
*** 238,243 ****
--- 250,258 ----
        self.currentvs = None
          self.corner1 = None
          
+         style = GraphicsAPI.getInstance().getTextStyle("SansSerif", 
java.awt.Font.PLAIN, 14);
+         self.broken = gzz.view.LinebrokenCellContentView(style)
+         
      def key(self, key):
        global currentScene
        if key == 'M':
***************
*** 389,396 ****
        global globalforw, globalback
  
        # Check type
!       if 1: # PDF
            self.view = getCellPDFView(cell)
  
        self.cursor = cell
        globalx, globaly = nx, ny
--- 404,413 ----
        global globalforw, globalback
  
        # Check type
!       if ispdf(cell): # PDF
            self.view = getCellPDFView(cell)
+         else:
+             self.view = None
  
        self.cursor = cell
        globalx, globaly = nx, ny
***************
*** 454,467 ****
            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)
            self.cliprect = None
  
!       self.view.placepapers(vs, cs1_trans, cliprect = clip,
                fancy = self.usefancypaper, showTessel = self.showtessel)
  
        self.buoys = []
            
--- 471,493 ----
            clip = (-0.2+globalx, -0.2+globaly, 0.2+globalx, 0.2+globaly)
            self.cliprect = clip
        else:
!             if self.view:
!               w = self.view.scaledsize[0]
!             else:
!                 w = TEXT_WIDTH
            extrax = 0.1
            extray = 0.1
            clip = (0-extrax, -extray, w+extrax, 1+extray)
            self.cliprect = None
  
!         if ispdf(self.cursor):
!           self.view.placepapers(vs, cs1_trans, cliprect = clip,
                fancy = self.usefancypaper, showTessel = self.showtessel)
+         else:
+             cs1_unscaled = vs.coords.scaleXYZ(cs1_trans, 1/200.0, 1/200.0, 1)
+             vs.matcher.add(cs1_unscaled, self.cursor.getId()+"__unscaled")
+             self.broken.place(self.cursor, vs, cs1_unscaled, TEXT_WIDTH, 500,
+                               self.win, 1.6);
  
        self.buoys = []
            




reply via email to

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