/[gzz]/gzz/gzz/vob/OrthoCoorder.java
ViewVC logotype

Diff of /gzz/gzz/vob/OrthoCoorder.java

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

revision 1.30 by benja, Thu Aug 22 22:53:03 2002 UTC revision 1.31 by benja, Wed Sep 4 22:15:39 2002 UTC
# Line 143  public static final String rcsid = "$Id$ Line 143  public static final String rcsid = "$Id$
143      }      }
144    
145      public void renderVobs(DefaultVobMap map, OrthoCoorder interpTo,      public void renderVobs(DefaultVobMap map, OrthoCoorder interpTo,
146                              float fract, java.awt.Graphics g, Color bg, Color fg) {                              float fract, java.awt.Graphics g, Color fg) {
147          renderVobs(map, interpTo, fract, g, bg, fg, 0, 0, 1, 1);          renderVobs(map, interpTo, fract, g, fg, 0, 0, 1, 1);
148      }      }
149    
150      /** Get the CS matching a CS from another OrthoCoorder. */      /** Get the CS matching a CS from another OrthoCoorder. */
# Line 160  public static final String rcsid = "$Id$ Line 160  public static final String rcsid = "$Id$
160      /** Render the vobs, fract towards the interpTo coordinates.      /** Render the vobs, fract towards the interpTo coordinates.
161       */       */
162      public void renderVobs(final DefaultVobMap map, final OrthoCoorder interpTo,      public void renderVobs(final DefaultVobMap map, final OrthoCoorder interpTo,
163                              final float fract, java.awt.Graphics g, Color bg, Color fg,                              final float fract, java.awt.Graphics g, Color fg,
164                              final float xoffs,                              final float xoffs,
165                              final float yoffs,                              final float yoffs,
166                              final float xscale,                              final float xscale,
# Line 169  public static final String rcsid = "$Id$ Line 169  public static final String rcsid = "$Id$
169          p("Rendervobs "+xoffs+" "+yoffs+" "+xscale+" "+yscale);          p("Rendervobs "+xoffs+" "+yoffs+" "+xscale+" "+yscale);
170          sys.sorter.sort();          sys.sorter.sort();
171          if(dbg) dump();          if(dbg) dump();
172            if(dbg) map.dump();
173            Color bg;
174            Vob bgvob = map.getVobByCS(0);
175            if(bgvob instanceof SolidBgVob) {
176                bg = ((SolidBgVob)bgvob).color;
177                if(dbg) pa("Background color: "+bg);
178            } else {
179                bg = Color.white;
180                if(dbg) pa("NO SOLIDBG VOB: Fall back on white bg color");
181            }
182          OrthoRenderInfo info = new OrthoRenderInfo(bg, fg, maxdepth);          OrthoRenderInfo info = new OrthoRenderInfo(bg, fg, maxdepth);
183          OrthoRenderInfo info2 = new OrthoRenderInfo(bg, fg, maxdepth);          OrthoRenderInfo info2 = new OrthoRenderInfo(bg, fg, maxdepth);
184          DefaultVobMap.RenderInfoSetter setter = new DefaultVobMap.RenderInfoSetter() {          DefaultVobMap.RenderInfoSetter setter = new DefaultVobMap.RenderInfoSetter() {
# Line 177  public static final String rcsid = "$Id$ Line 187  public static final String rcsid = "$Id$
187                  if(interpTo != null && sys.map.canInterpolate &&                  if(interpTo != null && sys.map.canInterpolate &&
188                                         interpTo.sys.map.canInterpolate) {                                         interpTo.sys.map.canInterpolate) {
189                      p("...interpTo != null");                      p("...interpTo != null");
190                        if(my == 0) {
191                            p("...my == 0.");
192                            setInterpInfo(my, interpTo, 0, fract,
193                                          xoffs, yoffs, xscale, yscale,
194                                          (OrthoRenderInfo) info);
195                            return true;
196                        }
197    
198                      if(sys.key[my] == null) {                      if(sys.key[my] == null) {
199                          p("...my.key == null.");                          p("...my.key == null.");
200                          return false;                          return false;
# Line 204  public static final String rcsid = "$Id$ Line 222  public static final String rcsid = "$Id$
222          p("Start rendering.");          p("Start rendering.");
223          int[] sorted = sys.sorter.sorted;          int[] sorted = sys.sorter.sorted;
224          int nsorted = sys.sorter.nsorted;          int nsorted = sys.sorter.nsorted;
225          for(int i=nsorted-1; i>0; i--) {          for(int i=nsorted-1; i>=0; i--) {
226              p("...set: "+sorted[i]);              p("...set: "+sorted[i]);
227              if(setter.set(info, sorted[i])) {              if(setter.set(info, sorted[i])) {
228                  p("...render: "+sorted[i]+" "+sys.key[sorted[i]]);                  p("...render: "+sorted[i]+" "+sys.key[sorted[i]]);

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

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