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

Diff of /gzz/gzz/view/TextCellContentView.java

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

revision 1.13 by benja, Sat Sep 28 22:55:13 2002 UTC revision 1.14 by benja, Sun Sep 29 14:53:45 2002 UTC
# Line 52  public static final String rcsid = "$Id$ Line 52  public static final String rcsid = "$Id$
52      }      }
53    
54      static Rectangle box = new Rectangle();      static Rectangle box = new Rectangle();
55      public void place(Cell c, VobScene v, int cs_out, int cs_box, float x, float y, float w, float h, ViewContext context, float scale) {      public void place(Cell c, VobScene v, int cs, float w, float h,
56                          ViewContext context, float scale) {
57          String s = c.t();          String s = c.t();
58          if (s == null) s = "";          if (s == null) s = "";
59          int offs = context.getCursorOffset(c);          int offs = context.getCursorOffset(c);
# Line 86  public static final String rcsid = "$Id$ Line 87  public static final String rcsid = "$Id$
87          else skew = (- left + middle);          else skew = (- left + middle);
88    
89          Object key = (line < KEY.length) ? KEY[line] : new Integer(line+1);          Object key = (line < KEY.length) ? KEY[line] : new Integer(line+1);
90          // int skewedcs = v.coordsys(cs, key, 0, skew, 0, w, box.height);          int skewedcs = v.coordsys(cs, key, 0, skew, 0, 2, 2);
91    
92          placeVob(c, v, cs_out, cs_box, brBefore, brAfter, offs, context, scale);          placeVob(c, v, skewedcs, w, box.height, brBefore, brAfter, offs, context, scale);
93      }      }
94    
95      protected void placeVob(Cell c, VobScene v, int cs_out, int cs_box, int start, int end,      static Object WH_KEY = new Object();
96        protected void placeVob(Cell c, VobScene v, int cs, float w, float h, int start, int end,
97                              int offs, ViewContext context, float scale) {                              int offs, ViewContext context, float scale) {
98          TextVob vob = new TextVob(style, scale, c.t().substring(start, end));          TextVob vob = new TextVob(style, scale, c.t().substring(start, end));
99          v.map.put(vob, cs_box);//, cs_out);          int cs_wh = v.coords.coordsys(0, 0, 0, 0, w, h);
100            ((DefaultVobMatcher)v.matcher).addSub(cs, cs_wh, WH_KEY);
101            v.map.put(vob, cs, cs_wh);
102    
103          if(offs >= 0)          if(offs >= 0)
104              v.map.put(new TextCursorVob(vob, offs), cs_box);              v.map.put(new TextCursorVob(vob, offs), cs, cs_wh);
105      }      }
106  }  }

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

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