gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz/gzz/modules/pp PlaneView.java demotest.py v...


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz/gzz/modules/pp PlaneView.java demotest.py v...
Date: Mon, 07 Oct 2002 02:21:12 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/10/07 02:21:11

Modified files:
        gzz/modules/pp : PlaneView.java demotest.py 
        gzz/modules/pp/vob: BgVob.java 

Log message:
        More work

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/PlaneView.java.diff?tr1=1.47&tr2=1.48&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/demotest.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/vob/BgVob.java.diff?tr1=1.25&tr2=1.26&r1=text&r2=text

Patches:
Index: gzz/gzz/modules/pp/PlaneView.java
diff -c gzz/gzz/modules/pp/PlaneView.java:1.47 
gzz/gzz/modules/pp/PlaneView.java:1.48
*** gzz/gzz/modules/pp/PlaneView.java:1.47      Sun Oct  6 13:37:46 2002
--- gzz/gzz/modules/pp/PlaneView.java   Mon Oct  7 02:21:10 2002
***************
*** 39,45 ****
   */
  
  public class PlaneView {
! public static final String rcsid = "$Id: PlaneView.java,v 1.47 2002/10/06 
17:37:46 tjl Exp $";
      public static boolean dbg = true;
      private static void pa(String s) { System.err.println(s); }
  
--- 39,45 ----
   */
  
  public class PlaneView {
! public static final String rcsid = "$Id: PlaneView.java,v 1.48 2002/10/07 
06:21:10 tjl Exp $";
      public static boolean dbg = true;
      private static void pa(String s) { System.err.println(s); }
  
***************
*** 59,73 ****
      }
  
      /** Render a single paper into the given coordinate system
       */
!     public VobScene renderPaper(VobScene vs, Cell cursor, int into, List 
leftBuoys,
!                   List rightBuoys) {
  
        if(dbg) pa("GetPaperscene: "+cursor);
  
        Cell plane = cursor.h(Win.d_contains);
        Cell note = plane.s(Win.d_contains);
  
        Space space = cursor.space;
        Dim d_1 = space.getDim(Ids.d_1);
        Dim d_clone = space.getDim(Ids.d_clone);
--- 59,76 ----
      }
  
      /** Render a single paper into the given coordinate system
+      * @param into The coordinate system which has the paper coordinates to 
       */
!     public VobScene renderPaper(VobScene vs, Cell cursor, int offsetInCell,
!                   int into, List leftBuoys, List rightBuoys) {
  
        if(dbg) pa("GetPaperscene: "+cursor);
  
        Cell plane = cursor.h(Win.d_contains);
        Cell note = plane.s(Win.d_contains);
  
+       BgVob bg = BgVob.create(plane);
+ 
        Space space = cursor.space;
        Dim d_1 = space.getDim(Ids.d_1);
        Dim d_clone = space.getDim(Ids.d_clone);
***************
*** 84,94 ****
  
            Vob v = new TextVob(style, 1, note.t());
  
!           vs.put(v, note, 5, notex, notey, 100, 100);
  
            if(note.equals(cursor)) {
                int cursorx = (int)style.getWidth(note.t()
!                                            .substring(0,Win.offsetInCell),
                                             1);
                if(dbg) pa("Placing text cursor "+notex+" "+cursorx+" "+notey+" 
"+dh);
                vs.put(new TextCursorVob(), TEXTCURSORKEY, 
--- 87,98 ----
  
            Vob v = new TextVob(style, 1, note.t());
  
!           int cs = vs.coordsys(into, note, 5, notex, notey, 10, 10);
!           vs.map.put(v, cs);
  
            if(note.equals(cursor)) {
                int cursorx = (int)style.getWidth(note.t()
!                                            .substring(0,offsetInCell),
                                             1);
                if(dbg) pa("Placing text cursor "+notex+" "+cursorx+" "+notey+" 
"+dh);
                vs.put(new TextCursorVob(), TEXTCURSORKEY, 
Index: gzz/gzz/modules/pp/demotest.py
diff -c gzz/gzz/modules/pp/demotest.py:1.2 gzz/gzz/modules/pp/demotest.py:1.3
*** gzz/gzz/modules/pp/demotest.py:1.2  Sun Oct  6 13:37:46 2002
--- gzz/gzz/modules/pp/demotest.py      Mon Oct  7 02:21:10 2002
***************
*** 4,9 ****
--- 4,10 ----
  from gzz.impl import *
  from gzz.media.impl import *
  from gzz.modules.pp import *
+ import math
  
  obsTrigger = SimpleObsTrigger();
  cellTexter = SimpleVStreamTexter(FakeSpanMaker(), 
Enfilade1DImpl.Enfilade1DImplMaker())
***************
*** 25,39 ****
  ppactions.newNote(id, 100, 100, "WIgdqp")
  ppactions.newNote(id, 100, 200, "Foog")
  
  
  class PlaneViewScene:
      def __init__(self):
        self.pv = PlaneView(VobKeyer())
      def scene(self, vs):
        vs.map.put(background((0.4,0.5,0.8)))
!       self.pv.renderPaper(vs, cursor, 0, None, None)
      def key(self, key):
        pass
! 
  
  currentScene = PlaneViewScene()
--- 26,58 ----
  ppactions.newNote(id, 100, 100, "WIgdqp")
  ppactions.newNote(id, 100, 200, "Foog")
  
+ ppactions.newNote(id, 0, 0, "Abksefvu21249")
+ 
  
  class PlaneViewScene:
      def __init__(self):
        self.pv = PlaneView(VobKeyer())
+       self.scale = 1
      def scene(self, vs):
        vs.map.put(background((0.4,0.5,0.8)))
!       self.cs1 = vs.coords.affineCoordsys(0, 0, 100, 100, self.scale, 0, 0, 
self.scale)
!       vs.matcher.add(self.cs1, "Global")
!       self.pv.renderPaper(vs, cursor, -1, self.cs1, None, None)
!       self.currentvs = vs
      def key(self, key):
        pass
!     def mouse(self, ev):
!       if ev.getID() == ev.MOUSE_CLICKED:
!           pass
!       elif ev.getID() == ev.MOUSE_PRESSED:
!           self.press = (ev.getX(), ev.getY())
!           self.pscale = self.scale
!       elif ev.getID() == ev.MOUSE_DRAGGED:
!           self.scale = self.pscale * math.exp((self.press[1] - 
ev.getY())/150.0)
!           self.currentvs.coords.setAffineParams(self.cs1,
!                   0, 100, 100, self.scale, 0, 0, self.scale)
!           replaceNewScene(self.currentvs)
!           AbstractUpdateManager.setNoAnimation()
!           AbstractUpdateManager.chg()
  
  currentScene = PlaneViewScene()
Index: gzz/gzz/modules/pp/vob/BgVob.java
diff -c gzz/gzz/modules/pp/vob/BgVob.java:1.25 
gzz/gzz/modules/pp/vob/BgVob.java:1.26
*** gzz/gzz/modules/pp/vob/BgVob.java:1.25      Mon Sep 23 04:24:26 2002
--- gzz/gzz/modules/pp/vob/BgVob.java   Mon Oct  7 02:21:10 2002
***************
*** 36,44 ****
   * used to pan pretty easily.
   */
  public class BgVob extends gzz.vob.Vob {
! public static final String rcsid = "$Id: BgVob.java,v 1.25 2002/09/23 
08:24:26 tjl Exp $";
      public static boolean dbg = false;
-     private static void p(String s) { if(dbg) pa(s); }
      private static void pa(String s) { System.err.println(s); }
  
      //    public Rectangle clip;
--- 36,43 ----
   * used to pan pretty easily.
   */
  public class BgVob extends gzz.vob.Vob {
! public static final String rcsid = "$Id: BgVob.java,v 1.26 2002/10/07 
06:21:10 tjl Exp $";
      public static boolean dbg = false;
      private static void pa(String s) { System.err.println(s); }
  
      //    public Rectangle clip;
***************
*** 63,69 ****
                                Vob.RenderInfo info2) {
        info1.getExtRect(rect);
        info2.getExtRect(rect2);
!       if(dbg) p("RectBg.render "+rect+" "+rect2);
  
        int x0, y0, x1, y1;
        x0 = rect2.x; x1 = rect2.x + rect2.width;
--- 62,68 ----
                                Vob.RenderInfo info2) {
        info1.getExtRect(rect);
        info2.getExtRect(rect2);
!       if(dbg) pa("RectBg.render "+rect+" "+rect2);
  
        int x0, y0, x1, y1;
        x0 = rect2.x; x1 = rect2.x + rect2.width;
***************
*** 72,78 ****
        Color old = g.getColor();
        g.setColor(bgcolor != null ? bgcolor : Color.white);
        g.fillRect(rect.x, rect.y, rect.width, rect.height);
-       // p("Draw filled rect!");
        g.setColor(old);
      }
  
--- 71,76 ----
***************
*** 86,92 ****
            Paper  pap;
            GLRen.PaperQuad pq;
            pap = PaperMill.getInstance().getPaper(c.hashCode());
!           ret = GLRen.createPaperQuad(pap, -1, -1, 1, 1, 100);
            papers.put(c, ret);
  
            list = GL.createDisplayList(
--- 84,90 ----
            Paper  pap;
            GLRen.PaperQuad pq;
            pap = PaperMill.getInstance().getPaper(c.hashCode());
!           ret = GLRen.createPaperQuad(pap, -1, -1, 1, 1, 0);
            papers.put(c, ret);
  
            list = GL.createDisplayList(




reply via email to

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