/[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.10 by tjl, Wed Sep 25 14:45:43 2002 UTC revision 1.11 by tjl, Fri Sep 27 09:07:56 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, ViewContext context, float scale) {      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) {
56          String s = c.t();          String s = c.t();
57          if (s == null) s = "";          if (s == null) s = "";
58          int offs = context.getCursorOffset(c);          int offs = context.getCursorOffset(c);
# Line 77  public static final String rcsid = "$Id$ Line 77  public static final String rcsid = "$Id$
77          float left = style.getWidth(s.substring(0, center), scale);          float left = style.getWidth(s.substring(0, center), scale);
78          float right = width - left;          float right = width - left;
79    
80          v.coords.getRenderInfo(cs).getExtRect(box);          float middle = w / 2.0f;
         float middle = box.width / 2.0f;  
81    
82          float skew;          float skew;
83          if(width < box.width) skew = 0;          if(width < w) skew = 0;
84          else if(left < middle) skew = 0;          else if(left < middle) skew = 0;
85          else if(right < middle) skew = (- width + box.width);          else if(right < middle) skew = (- width + w);
86          else skew = (- left + middle);          else skew = (- left + middle);
87    
88          Object key = (line < KEY.length) ? KEY[line] : new Integer(line+1);          Object key = (line < KEY.length) ? KEY[line] : new Integer(line+1);
89          int skewedcs = v.coordsys(cs, key, 0, skew, 0, width, box.height);          // int skewedcs = v.coordsys(cs, key, 0, skew, 0, w, box.height);
90    
91          placeVob(c, v, skewedcs, brBefore, brAfter, offs, context, scale);          placeVob(c, v, cs_box, brBefore, brAfter, offs, context, scale);
92      }      }
93    
94      protected void placeVob(Cell c, VobScene v, int cs, int start, int end,      protected void placeVob(Cell c, VobScene v, int cs, int start, int end,

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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