119 |
|
|
120 |
static Rectangle rect = new Rectangle(); |
static Rectangle rect = new Rectangle(); |
121 |
|
|
122 |
/** Add the vobs that make up an image of a cell |
float[] boxwh = new float[2]; |
123 |
* into the given coordinate |
|
124 |
* system of the given vobscene. |
public void place(final Cell c, final VobScene vs, |
125 |
* @param c The cell |
final int box, |
|
* @param v The vobscene to add to |
|
|
* @param box The box in which the cell should be. |
|
|
* @param context The view context, for querying cursors, marks etc. |
|
|
*/ |
|
|
public void place(final Cell c, final VobScene v, |
|
|
final Box box, |
|
126 |
final ViewContext context) { |
final ViewContext context) { |
127 |
setCenter(context.getAccursed()); |
setCenter(context.getAccursed()); |
128 |
if(d_clone == null) |
if(d_clone == null) |
153 |
bg.setBg(bg.getBg().darker().darker()); |
bg.setBg(bg.getBg().darker().darker()); |
154 |
} |
} |
155 |
|
|
|
final Box contentBox = new Box(); |
|
156 |
float pad = 5; |
float pad = 5; |
157 |
contentBox.setSubWH(box, "CO", pad, pad, box.getWidth()-2*pad, box.getHeight()-2*pad); |
|
158 |
|
vs.coords.getSqSize(box, boxwh); |
159 |
|
final int contentBox = vs.orthoBoxCS(box, "CONTENT", 0, pad, pad, 1, 1, |
160 |
|
boxwh[0]-2*pad, boxwh[1]-2*pad); |
161 |
|
final int unitsq = vs.unitSqCS(box, "UNIT"); |
162 |
|
|
163 |
if(!(GraphicsAPI.getInstance() instanceof gzz.client.gl.GLAPI)) { |
if(!(GraphicsAPI.getInstance() instanceof gzz.client.gl.GLAPI)) { |
164 |
ccv.place(c, v, contentBox, context); |
ccv.place(c, vs, contentBox, context); |
165 |
v.map.put(bg, box.getUnitCoordsys()); |
vs.map.put(bg, unitsq); |
166 |
} else { |
} else { |
167 |
v.map.put(bg, box.getUnitCoordsys()); |
vs.map.put(bg, unitsq); |
168 |
gzz.gfx.gl.Stencil.drawStenciled( |
gzz.gfx.gl.Stencil.drawStenciled( |
169 |
v, |
vs, |
170 |
new Runnable() { public void run() { |
new Runnable() { public void run() { |
171 |
v.map.put(bg, box.getUnitCoordsys()); |
vs.map.put(bg, unitsq); |
172 |
}}, |
}}, |
173 |
null, |
null, |
174 |
null, |
null, |
175 |
new Runnable() { public void run() { |
new Runnable() { public void run() { |
176 |
ccv.place(c, v, contentBox, context); |
ccv.place(c, vs, contentBox, context); |
177 |
}}, |
}}, |
178 |
false |
false |
179 |
); |
); |