/[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.27 by benja, Sun Nov 24 20:09:18 2002 UTC revision 1.28 by humppake, Mon Nov 25 16:03:39 2002 UTC
# Line 123  public static final String rcsid = "$Id$ Line 123  public static final String rcsid = "$Id$
123                              int offs, ViewContext context, float scale) {                              int offs, ViewContext context, float scale) {
124              // XXX should optimize for common case: no substring()              // XXX should optimize for common case: no substring()
125          TextVob vob = new TextVob(style, c.t().substring(start, end));          TextVob vob = new TextVob(style, c.t().substring(start, end));
126          int cs_scaled = vs.orthoCS(cs, WH_KEY, 0, 0, 0, h, h);          float scaled_h = vob.getHeight(scale) + vob.getDepth(scale);
127            int cs_scaled = vs.orthoCS(cs, WH_KEY, 0, 0, 0, scaled_h, scaled_h);
128          vs.map.put(vob, cs_scaled);          vs.map.put(vob, cs_scaled);
129    
130          if(offs >= 0 && offs >= start && offs <= end) {          if(offs >= 0 && offs >= start && offs <= end) {
131              float x = style.getWidth(c.t().substring(start, offs), 1);              float x = style.getWidth(c.t().substring(start, offs), 1);
132              int cs_cursor = vs.orthoCS(cs, CURS_KEY, -1, x+1, 0, 0,h);              int cs_cursor = vs.orthoCS(cs, CURS_KEY, -1, x+1, 0, 0,scaled_h);
133              // v.map.put(new TextCursorVob(vob, offs), cs);              // v.map.put(new TextCursorVob(vob, offs), cs);
134              vs.map.put(cursorVob, cs_cursor);              vs.map.put(cursorVob, cs_cursor);
135          }          }

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

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