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); |
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 |
} |
} |