56 |
VobKeyer keyer; |
VobKeyer keyer; |
57 |
Buoy4Floater rightfloater, leftfloater; |
Buoy4Floater rightfloater, leftfloater; |
58 |
|
|
59 |
public PlaneView(VobKeyer keyer, Buoy4Floater leftfloater, |
public PlaneView(Space space, VobKeyer keyer, Buoy4Floater leftfloater, |
60 |
Buoy4Floater rightfloater) { |
Buoy4Floater rightfloater) { |
61 |
this.keyer = keyer; |
this.keyer = keyer; |
62 |
this.rightfloater = rightfloater; |
this.rightfloater = rightfloater; |
63 |
this.leftfloater = leftfloater; |
this.leftfloater = leftfloater; |
64 |
|
d = new PPDims(space); |
65 |
} |
} |
66 |
|
|
67 |
|
PPDims d; |
68 |
|
|
69 |
/** Render a single paper into the given coordinate system |
/** Render a single paper into the given coordinate system |
70 |
* @param into The coordinate system which has the paper coordinates to |
* @param into The coordinate system which has the paper coordinates to |
71 |
*/ |
*/ |
74 |
|
|
75 |
if(dbg) pa("GetPaperscene: "+cursor); |
if(dbg) pa("GetPaperscene: "+cursor); |
76 |
|
|
77 |
Cell plane = cursor.h(Win.d_contains); |
Cell plane = cursor.h(d.contains); |
78 |
Cell note = plane.s(Win.d_contains); |
Cell note = plane.s(d.contains); |
79 |
|
|
80 |
BgVob bg = BgVob.create(plane); |
BgVob bg = BgVob.create(plane); |
81 |
int bginto = vs.coords.ortho(viewport2screen, 500, 0, 0, 1, 1); |
int bginto = vs.coords.ortho(viewport2screen, 500, 0, 0, 1, 1); |
95 |
|
|
96 |
while(note != null) { // For every note on the paper |
while(note != null) { // For every note on the paper |
97 |
if(dbg) pa("Note: "+note); |
if(dbg) pa("Note: "+note); |
98 |
int place[] = Params.getInts(note.s(Win.d_pan, 1), Win.d_pan, 2, null); |
int place[] = Params.getInts(note.s(d.pan, 1), d.pan, 2, null); |
99 |
|
|
100 |
int notex = place[0]; |
int notex = place[0]; |
101 |
int notey = place[1]; |
int notey = place[1]; |
127 |
placeNormalBuoys(vs, cs, note); |
placeNormalBuoys(vs, cs, note); |
128 |
} |
} |
129 |
|
|
130 |
note = note.s(Win.d_contains); |
note = note.s(d.contains); |
131 |
} |
} |
132 |
} |
} |
133 |
|
|
137 |
// show association candidates for the cell currently in edit |
// show association candidates for the cell currently in edit |
138 |
// search only planes on d.user-1, look for same prefix |
// search only planes on d.user-1, look for same prefix |
139 |
|
|
140 |
Cell plane = note.h(Win.d_contains); |
Cell plane = note.h(d.contains); |
141 |
Cell start = plane.h(d_1); //.s(Dims.d_user_1_id); |
Cell start = plane.h(d_1); //.s(Dims.d_user_1_id); |
142 |
String cur = note.t(); |
String cur = note.t(); |
143 |
if(cur.length() >= 1) { |
if(cur.length() >= 1) { |
144 |
while(start != null) { |
while(start != null) { |
145 |
for(Cell otherNote = start.s(Win.d_contains); otherNote != null; |
for(Cell otherNote = start.s(d.contains); otherNote != null; |
146 |
|
|
147 |
otherNote = otherNote.s(Win.d_contains)) { |
otherNote = otherNote.s(d.contains)) { |
148 |
/* |
/* |
149 |
if(otherNote.equals(note)) continue; |
if(otherNote.equals(note)) continue; |
150 |
if(otherNote.t().startsWith(cur)) { |
if(otherNote.t().startsWith(cur)) { |
171 |
// proper margins |
// proper margins |
172 |
for(Cell assoc = note; assoc != null; |
for(Cell assoc = note; assoc != null; |
173 |
assoc = assoc.s(d_clone)) { |
assoc = assoc.s(d_clone)) { |
174 |
Cell left = assoc.s(Win.d_association, -1); |
Cell left = assoc.s(d.association, -1); |
175 |
Cell right = assoc.s(Win.d_association, 1); |
Cell right = assoc.s(d.association, 1); |
176 |
if(dbg) pa("BUOYS: LINKS"); |
if(dbg) pa("BUOYS: LINKS"); |
177 |
if(dbg) pa("left: "+left+" right: "+right); |
if(dbg) pa("left: "+left+" right: "+right); |
178 |
if(right != null) { |
if(right != null) { |
194 |
int w = 200, h = 200; |
int w = 200, h = 200; |
195 |
int magcs = vs.orthoCS(cs, "Mag", -10, -w/2, -h/2, w, h); |
int magcs = vs.orthoCS(cs, "Mag", -10, -w/2, -h/2, w, h); |
196 |
center = center.getRootclone(); |
center = center.getRootclone(); |
197 |
int place[] = Params.getInts(center.s(Win.d_pan, 1), Win.d_pan, 2, null); |
int place[] = Params.getInts(center.s(d.pan, 1), d.pan, 2, null); |
198 |
float scale = 0.01f; |
float scale = 0.01f; |
199 |
int p2v = vs.matcher.addSub( |
int p2v = vs.matcher.addSub( |
200 |
cs, |
cs, |