287 |
centerX(vs), buoyCenterY, buoyRadius, |
centerX(vs), buoyCenterY, buoyRadius, |
288 |
centerX(vs) - dir * buoyRadius, buoyCenterY); |
centerX(vs) - dir * buoyRadius, buoyCenterY); |
289 |
} |
} |
290 |
public void buoy(final int anchor, final Cell c, Cell connectedFrom) { |
public void buoy(final int anchor, final Cell c, Cell connectedFrom, int count) { |
291 |
Object key ; |
Object key ; |
292 |
if(dir > 0) |
if(dir > 0) |
293 |
key = new Pair(connectedFrom, c); |
key = new Pair(connectedFrom, c); |
295 |
key = new Pair(c, connectedFrom); |
key = new Pair(c, connectedFrom); |
296 |
final int anchorUnit = vs.unitSqCS(anchor, "AUSQ"); |
final int anchorUnit = vs.unitSqCS(anchor, "AUSQ"); |
297 |
int actr = vs.translateCS(anchorUnit, "TR12", .5f, .5f); |
int actr = vs.translateCS(anchorUnit, "TR12", .5f, .5f); |
|
int buoycs = floater.buoyCoordsys(actr, key); |
|
298 |
|
|
299 |
|
// 1-N kludge |
300 |
|
pa("count: "+count+", even? "+ count %2); |
301 |
|
if (count %2 == 0) { |
302 |
|
count--; |
303 |
|
} else count *= -1; |
304 |
|
actr = vs.translateCS(actr, "SHIFT_"+count, 0, count*2); |
305 |
|
//actr = vs.translateCS(actr, "SHIFT_"+count, 0,5); |
306 |
|
|
307 |
|
int buoycs = floater.buoyCoordsys(actr, key); |
308 |
|
|
309 |
// Nadir CS |
// Nadir CS |
310 |
final int nadir_point_cs; |
final int nadir_point_cs; |
316 |
((GLVobCoorder)vs.coords).nadirOrigin(buoycs, nadir_point_cs); |
((GLVobCoorder)vs.coords).nadirOrigin(buoycs, nadir_point_cs); |
317 |
vs.matcher.add(nadir_buoy, "NADIR"+c.toString() ); |
vs.matcher.add(nadir_buoy, "NADIR"+c.toString() ); |
318 |
|
|
|
//final int frameCS = vs.orthoBoxCS(buoycs, "frame", 0, |
|
319 |
final int frameCS = vs.orthoBoxCS(nadir_buoy, "frame", 0, |
final int frameCS = vs.orthoBoxCS(nadir_buoy, "frame", 0, |
320 |
-buoyVPWidth/2, -buoyVPHeight/2, 1, 1, |
-buoyVPWidth/2, -buoyVPHeight/2, 1, 1, |
321 |
buoyVPWidth, buoyVPHeight); |
buoyVPWidth, buoyVPHeight); |
387 |
AbstractViewContext main_vc = new AbstractViewContext(); |
AbstractViewContext main_vc = new AbstractViewContext(); |
388 |
main_vc.setAccursed(context.getAccursed()); |
main_vc.setAccursed(context.getAccursed()); |
389 |
main_vc.setCursorOffset(context.getCursorOffset(context.getAccursed())); |
main_vc.setCursorOffset(context.getCursorOffset(context.getAccursed())); |
390 |
|
|
391 |
|
// reddish |
392 |
((ImageCell)cellview).setAccursedCell(context.getAccursed()); |
((ImageCell)cellview).setAccursedCell(context.getAccursed()); |
393 |
|
|
394 |
if(showLinkbuoys) |
if(showLinkbuoys) |
410 |
int frameCS = vs.orthoBoxCS(mainctr, "MAINVP", 10, |
int frameCS = vs.orthoBoxCS(mainctr, "MAINVP", 10, |
411 |
(-mainWidth)/2, -mainHeight/2, 1, 1, |
(-mainWidth)/2, -mainHeight/2, 1, 1, |
412 |
mainWidth, mainHeight); |
mainWidth, mainHeight); |
|
/* |
|
|
int frameCS = vs.orthoBoxCS(mainctr, "MAINVP", 10, |
|
|
0, 0, 1,1, |
|
|
mainWidth/2, mainHeight/2); |
|
|
*/ |
|
413 |
vs.activate(frameCS); |
vs.activate(frameCS); |
414 |
|
|
415 |
// cell to frame CS |
// cell to frame CS |
416 |
int c2fCS = vs.coords.ortho(0, 0, 0, 0, 10, 10); |
int c2fCS = vs.coords.ortho(0, 0, 0, 0, 10, 10); |
|
//int c2fCS = vs.coords.ortho(0, -5,-5,0, 20,20); |
|
417 |
vs.matcher.add(frameCS, c2fCS, "C2F"); |
vs.matcher.add(frameCS, c2fCS, "C2F"); |
418 |
|
|
419 |
MAIN_CS = frameCS; |
MAIN_CS = frameCS; |
439 |
panx = coords[0]; |
panx = coords[0]; |
440 |
pany = coords[1]; |
pany = coords[1]; |
441 |
if (viewMode == TEXT_EDITING) { |
if (viewMode == TEXT_EDITING) { |
442 |
panx += TE_SIFT_X; |
panx += TE_SIFT_X /zoom; |
443 |
pany += TE_SIFT_Y; |
pany += TE_SIFT_Y /zoom; |
444 |
} |
} |
445 |
} |
} |
446 |
setZoomPan(vs); |
setZoomPan(vs); |
552 |
int paper_count=0; |
int paper_count=0; |
553 |
int accursed_paper_count=0; |
int accursed_paper_count=0; |
554 |
for (; p!=null; paper_count++) { |
for (; p!=null; paper_count++) { |
555 |
if (p.h(d.contains)==accursed_p.h(d.contains)) accursed_paper_count = paper_count; |
if (p.h(d.contains) == accursed_p.h(d.contains)) |
556 |
|
accursed_paper_count = paper_count; |
557 |
p = p.s(d.d1); |
p = p.s(d.d1); |
558 |
} |
} |
559 |
|
|