/[gzz]/gzz/gzz/view/DimDecorator.java
ViewVC logotype

Diff of /gzz/gzz/view/DimDecorator.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by benja, Sat Sep 28 09:17:14 2002 UTC revision 1.8 by benja, Sun Sep 29 14:53:45 2002 UTC
# Line 46  String rcsid = "$Id$"; Line 46  String rcsid = "$Id$";
46    
47      static Object origKey = new Object(), viewKey = new Object();      static Object origKey = new Object(), viewKey = new Object();
48      static Object[] dimKeys = { new Object(), new Object(), new Object() };      static Object[] dimKeys = { new Object(), new Object(), new Object() };
49        static Object boxKey = new Object();
50    
51      public void render(VobScene sc, int into, Fallback fallback, Fallback.Win win) {      public void render(VobScene sc, int into, Fallback fallback, Fallback.Win win) {
52          //p("Placing DimDecorations");          //p("Placing DimDecorations");
# Line 59  String rcsid = "$Id$"; Line 60  String rcsid = "$Id$";
60          int w = size.width, h = size.height;          int w = size.width, h = size.height;
61    
62          // The coordinate system where the lines start          // The coordinate system where the lines start
63          int orig = sc.coordsys(into, origKey, 0, 0, 0, w, h);          int orig = sc.coordsys(into, origKey, 0, 0, 0, 2, 2);
64    
65          // The coordinate systems of the dimensions          // The coordinate systems of the dimensions
66          int[] targ = {          int[] targ = {
67              sc.coordsys(into, dimKeys[0], 0, w, 0, w, h),              sc.coordsys(into, dimKeys[0], 0, w, 0, 2, 2),
68              sc.coordsys(into, dimKeys[1], 0, 0, h, w, h),              sc.coordsys(into, dimKeys[1], 0, 0, h, 2, 2),
69              sc.coordsys(into, dimKeys[2], 0, w, h, w, h)              sc.coordsys(into, dimKeys[2], 0, w, h, 2, 2)
70          };          };
71    
72          for(int i=0; i<3; i++) {          for(int i=0; i<3; i++) {
73              sc.map.put(conn, targ[i], orig);              sc.map.put(conn, targ[i], orig);
74              sc.map.put(bg, targ[i]);              int cs_box = sc.coordsys(targ[i], boxKey, 0, 0, 0, w, h);
75              int cs = sc.coordsys(targ[i], dimKeys[i], 0, 0, 0,              sc.map.put(bg, cs_box);
76                                          style.getWidth(dims[i].name, 1),              
77                                          style.getHeight(1));              int cs = sc.coordsys(targ[i], dimKeys[i], 0, 5, 5, 2, 2);
78              sc.map.put(new TextVob(style, dims[i].name), cs, into);              sc.map.put(new TextVob(style, dims[i].name), cs);
79          }          }
80    
81          View view = fallback.viewList[win.viewIndex];          View view = fallback.viewList[win.viewIndex];
# Line 84  String rcsid = "$Id$"; Line 85  String rcsid = "$Id$";
85              sc.coords.getRenderInfo(into).getExtRect(rect);              sc.coords.getRenderInfo(into).getExtRect(rect);
86              float vw = style.getWidth(name, 1.6f), vh = style.getHeight(1.6f);              float vw = style.getWidth(name, 1.6f), vh = style.getHeight(1.6f);
87              float vx = rect.width - vw - 10;              float vx = rect.width - vw - 10;
88              int cs = sc.coordsys(into, viewKey, 0, vx, 10, vw, vh);              int cs = sc.coordsys(into, viewKey, 0, vx, 10, 2, 2);
89              sc.map.put(new TextVob(style, 1.6f, name), cs, into);              sc.map.put(new TextVob(style, 1.6f, name), cs);
90          }          }
91      }      }
92  }  }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26