gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz ./TODO gfx/demo/gldemo.py gfx/demo/xupdf.py...


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz ./TODO gfx/demo/gldemo.py gfx/demo/xupdf.py...
Date: Wed, 02 Oct 2002 08:20:22 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/10/02 08:20:22

Modified files:
        .              : TODO 
        gfx/demo       : gldemo.py xupdf.py 
        gfx/libpaper   : texcoords.py 
        gzz/gfx/gl     : GLVobCoorder.java 
        gzz/view       : pagespanview.py 

Log message:
        Paper scaling

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.220&tr2=1.221&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/gldemo.py.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/xupdf.py.diff?tr1=1.36&tr2=1.37&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/texcoords.py.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/GLVobCoorder.java.diff?tr1=1.32&tr2=1.33&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/pagespanview.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text

Patches:
Index: gzz/TODO
diff -c gzz/TODO:1.220 gzz/TODO:1.221
*** gzz/TODO:1.220      Wed Oct  2 07:28:48 2002
--- gzz/TODO    Wed Oct  2 08:20:22 2002
***************
*** 57,70 ****
          caching problems.
      tjl:
        - xupdf: distorted multi-page PDF view with xu links
!           - *1 edit bindings for xupdf demo [tjl says: I don't think
!               I'll have the time to do these, and you're better
!               with bindings anyway - can you take a look?]
                - bindings for painting, showing painted area
!                   [ through editing and rerendering the current 
!                     vobscene? ]
                - marking page spans (after painted with mouse) 
!           - larger structure (dep. *1)
                - combine client and xupdf
                    - keep abstracting out parts of xupdf and 
                      make them usable from Java.
--- 57,70 ----
          caching problems.
      tjl:
        - xupdf: distorted multi-page PDF view with xu links
!           - edit bindings for xupdf demo 
                - bindings for painting, showing painted area
!                 through editing and rerendering the current 
!                 vobscene? 
                - marking page spans (after painted with mouse) 
!           - get rid of XuPDF_Zoomed, implement same funcs through
!             the context object, saves code.
!           - larger structure 
                - combine client and xupdf
                    - keep abstracting out parts of xupdf and 
                      make them usable from Java.
***************
*** 105,110 ****
--- 105,113 ----
          get the benefits of page flipping. How does this interact with e.g.
          twinview? Need to turn it off?
        + fix fillet demo last two screens
+       + make GLVobCoorder's all coordsys types
+         work like affineCoordsys and setAffineParams, so
+         that we can set the params from outside easier.
  
  0.8alpha4: Cleanup release after crucial demos; make it possible for anyone to
            get *THE* demo up and running
Index: gzz/gfx/demo/gldemo.py
diff -c gzz/gfx/demo/gldemo.py:1.26 gzz/gfx/demo/gldemo.py:1.27
*** gzz/gfx/demo/gldemo.py:1.26 Sun Sep 29 10:51:27 2002
--- gzz/gfx/demo/gldemo.py      Wed Oct  2 08:20:22 2002
***************
*** 217,225 ****
            currentScene.key(s)
        AbstractUpdateManager.chg()
      def mouse(self, e):
        if hasattr(currentScene, "mouse"):
            currentScene.mouse(e)
-       # print "MOUSE: '%s'"%e
      def timeout(self, o):
        print str(System.currentTimeMillis()) + " TIMEOUT ",o
        currentScene.timeout(o)
--- 217,225 ----
            currentScene.key(s)
        AbstractUpdateManager.chg()
      def mouse(self, e):
+       # print "MOUSE: '%s'"%e
        if hasattr(currentScene, "mouse"):
            currentScene.mouse(e)
      def timeout(self, o):
        print str(System.currentTimeMillis()) + " TIMEOUT ",o
        currentScene.timeout(o)
Index: gzz/gfx/demo/xupdf.py
diff -c gzz/gfx/demo/xupdf.py:1.36 gzz/gfx/demo/xupdf.py:1.37
*** gzz/gfx/demo/xupdf.py:1.36  Wed Oct  2 06:32:04 2002
--- gzz/gfx/demo/xupdf.py       Wed Oct  2 08:20:22 2002
***************
*** 245,250 ****
--- 245,268 ----
      def hit(self, coords, point3):
        return self.view.hitClip(coords, point3, self.cliprect)
  
+ selectPaper = Paper()
+ selectPaper.setNPasses(1)
+ pas = selectPaper.getPass(0)
+ pas.setSetupcode("""
+     PushAttrib ENABLE_BIT COLOR_BUFFER_BIT
+     Disable TEXTURE_2D
+     Disable DEPTH_TEST
+     Disable STENCIL_TEST
+     Color 1 1 1
+     Enable BLEND
+     BlendFunc ONE_MINUS_DST_COLOR ZERO
+ """)
+ pas.setTeardowncode("""
+     PopAttrib
+ """)
+ selectPaperQuad = GLRen.createPaperQuad(selectPaper, -1,-1,1,1, 1)
+ 
+ 
  class XuPDFScene_PDFContext:
      def __init__(self):
        self.mag = [(screensize[1]*1.5,20)]
***************
*** 286,291 ****
--- 304,311 ----
            checkGlobalCoords()
            print "Mouse ",globalx, globaly
            AbstractUpdateManager.chg()
+       else:
+           print "Unused mouse: ",ev
      def scene(self, vs):
        bg(vs)
        bf = effects.NadirCircleFloater_NoAnchor(vs, (self.ctrx, self.ctry), 
self.rad,
Index: gzz/gfx/libpaper/texcoords.py
diff -c gzz/gfx/libpaper/texcoords.py:1.12 gzz/gfx/libpaper/texcoords.py:1.13
*** gzz/gfx/libpaper/texcoords.py:1.12  Mon Sep 30 12:23:21 2002
--- gzz/gfx/libpaper/texcoords.py       Wed Oct  2 08:20:22 2002
***************
*** 56,67 ****
  class TexGenXYRepeatUnit:
      """ A class representing a parallelogram repeating unit in (x,y)
      coordinates.
      """
      def __init__(self, rnd=None, 
            vecs = None,
            angle_stddev = .065,
!           avg_length_mean = .5,
!           avg_length_stddev = .10,
            lendiff_mean = 0,
            lendiff_stddev = .1):
  
--- 56,70 ----
  class TexGenXYRepeatUnit:
      """ A class representing a parallelogram repeating unit in (x,y)
      coordinates.
+ 
+     The size of the repeating unit is designed to be suitable
+     for 1 to be the height of an A4 paper.
      """
      def __init__(self, rnd=None, 
            vecs = None,
            angle_stddev = .065,
!           avg_length_mean = .3,
!           avg_length_stddev = .07,
            lendiff_mean = 0,
            lendiff_stddev = .1):
  
Index: gzz/gzz/gfx/gl/GLVobCoorder.java
diff -c gzz/gzz/gfx/gl/GLVobCoorder.java:1.32 
gzz/gzz/gfx/gl/GLVobCoorder.java:1.33
*** gzz/gzz/gfx/gl/GLVobCoorder.java:1.32       Mon Sep 30 18:20:28 2002
--- gzz/gzz/gfx/gl/GLVobCoorder.java    Wed Oct  2 08:20:22 2002
***************
*** 29,35 ****
  import gzz.client.gl.*;
  
  public class GLVobCoorder extends AffineVobCoorder {
! public static final String rcsid = "$Id: GLVobCoorder.java,v 1.32 2002/09/30 
22:20:28 tjl Exp $";
      public static boolean dbg = false;
      private static void pa(String s) { System.err.println(s); }
  
--- 29,35 ----
  import gzz.client.gl.*;
  
  public class GLVobCoorder extends AffineVobCoorder {
! public static final String rcsid = "$Id: GLVobCoorder.java,v 1.33 2002/10/02 
12:20:22 tjl Exp $";
      public static boolean dbg = false;
      private static void pa(String s) { System.err.println(s); }
  
***************
*** 50,62 ****
        if(dbg) pa("AffineCoordSys "+ninds/3+": "+into+" '"+depth+" --- "+
                    cx+" "+cy+" "+x_x+" "+x_y+" "+y_x+" "+y_y);
  
-       floats[nfloats + 0] = cx;
-       floats[nfloats + 1] = cy;
-       floats[nfloats + 2] = depth;
-       floats[nfloats + 3] = x_x;
-       floats[nfloats + 4] = x_y;
-       floats[nfloats + 5] = y_x;
-       floats[nfloats + 6] = y_y;
        int paramInd = nfloats;
        nfloats += 7;
  
--- 50,55 ----
***************
*** 67,73 ****
--- 60,81 ----
        int was = ninds / 3;
        ninds += 3;
  
+       setAffineParams(was, depth, cx, cy, x_x, x_y, y_x, y_y);
+ 
        return was;
+     }
+ 
+     public void setAffineParams(
+           int cs, float depth, float cx, float cy, 
+           float x_x, float x_y, float y_x, float y_y) {
+       int ind = inds[cs + 2];
+       floats[ind + 0] = cx;
+       floats[ind + 1] = cy;
+       floats[ind + 2] = depth;
+       floats[ind + 3] = x_x;
+       floats[ind + 4] = x_y;
+       floats[ind + 5] = y_x;
+       floats[ind + 6] = y_y;
      }
  
      public int rotateXY(int into, float degrees) {
Index: gzz/gzz/view/pagespanview.py
diff -c gzz/gzz/view/pagespanview.py:1.7 gzz/gzz/view/pagespanview.py:1.8
*** gzz/gzz/view/pagespanview.py:1.7    Wed Oct  2 06:32:04 2002
--- gzz/gzz/view/pagespanview.py        Wed Oct  2 08:20:22 2002
***************
*** 7,12 ****
--- 7,14 ----
  import java
  from jarray import zeros
  
+ reload(gfx.libpaper.papermill)
+ 
  papermill = gfx.libpaper.papermill.ThePaperMill()
  
  # Module pagespanview




reply via email to

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