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

Diff of /gzz/gzz/view/CellVobFactory.java

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

revision 1.27 by tjl, Wed Oct 30 19:10:17 2002 UTC revision 1.28 by tjl, Fri Nov 1 19:53:52 2002 UTC
# Line 119  public static final String rcsid = "$Id$ Line 119  public static final String rcsid = "$Id$
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)
# Line 159  public static final String rcsid = "$Id$ Line 153  public static final String rcsid = "$Id$
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              );              );

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

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