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

Diff of /gzz/gzz/view/MarkDecorator.java

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

revision 1.9 by benja, Mon Oct 28 00:17:54 2002 UTC revision 1.10 by tjl, Tue Oct 29 07:30:58 2002 UTC
# Line 39  public class MarkDecorator implements Fa Line 39  public class MarkDecorator implements Fa
39    
40      public void render(VobScene vs, int into, Fallback fallback,      public void render(VobScene vs, int into, Fallback fallback,
41                         Fallback.Win win) {                         Fallback.Win win) {
42          java.awt.Dimension boxsize = new java.awt.Dimension();          float[] size = new float[2];
43          cv.getDefaultSize(1, boxsize);  
44            cv.getSize(null, size);
45    
46          int n = DefaultBinder.marks.size();          int n = DefaultBinder.marks.size();
47          if(n == 0) return;          if(n == 0) return;
48    
49          float w = boxsize.width, h = n * boxsize.height;          float w = size[0], h = n * size[1];
50    
51          java.awt.Dimension outer = vs.getSize();          java.awt.Dimension outer = vs.getSize();
52    
# Line 61  public class MarkDecorator implements Fa Line 62  public class MarkDecorator implements Fa
62              if(m.spans != null) return; // for now-- should show span(s)              if(m.spans != null) return; // for now-- should show span(s)
63              Cell c = m.cell;              Cell c = m.cell;
64    
65              int cs = vs.orthoCS(cs_list, c, 0, 0, i*boxsize.height, 1, 1);              int cs = vs.orthoCS(cs_list, c, 0, 0, i*w, 1, 1);
66              b.set(vs, cs, boxsize.width, boxsize.height);              b.set(vs, cs, w, h);
67    
68              cv.place(c, vs, b, win);              cv.place(c, vs, b, win);
69          }          }
# Line 70  public class MarkDecorator implements Fa Line 71  public class MarkDecorator implements Fa
71          w = style.getWidth(str, 1);          w = style.getWidth(str, 1);
72          h = style.getHeight(1);          h = style.getHeight(1);
73          y -= h;          y -= h;
74          if(w > boxsize.width)          if(w > size[0])
75              x += boxsize.width - w;              x += size[0] - w;
76    
77          int cs = vs.orthoCS(into, TEXT_KEY, 0, x, y, 2, 2);          int cs = vs.orthoCS(into, TEXT_KEY, 0, x, y, 2, 2);
78          vs.map.put(new TextVob(style, str), cs);          vs.map.put(new TextVob(style, str), cs);

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

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