/[fenfire]/fenfire/org/fenfire/spanimages/gl/SingleImage.java
ViewVC logotype

Diff of /fenfire/org/fenfire/spanimages/gl/SingleImage.java

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

revision 1.12 by tjl, Mon Aug 25 10:52:13 2003 UTC revision 1.13 by tjl, Fri Oct 17 09:25:34 2003 UTC
# Line 27  SingleImage.java Line 27  SingleImage.java
27  package org.fenfire.spanimages.gl;  package org.fenfire.spanimages.gl;
28  import java.io.File;  import java.io.File;
29  import org.nongnu.libvob.gl.*;  import org.nongnu.libvob.gl.*;
30    import org.nongnu.libvob.gl.virtualtexture.*;
31  import org.nongnu.libvob.memory.*;  import org.nongnu.libvob.memory.*;
32    
33  /** A single texture image of an imagespan or pageimagespan.  /** A single texture image of an imagespan or pageimagespan.
# Line 37  public class SingleImage { Line 38  public class SingleImage {
38      public static boolean dbg = false;      public static boolean dbg = false;
39      private static void p(String s) { System.out.println("SingleImage: "+s); }      private static void p(String s) { System.out.println("SingleImage: "+s); }
40    
41      public final MipzipLoader loader;      public final VirtualTexture virtualTexture;
42      public final GL.TexAccum accum;      public final GL.TexAccum accum;
43    
44      /** For each mipmap level of loader, the number of pixels      /** For each mipmap level of the texture, the number of pixels
45       * that would be rendered less than optimally.       * that would be rendered less than optimally.
46       * These numbers are calculated cumulatively with time, along       * These numbers are calculated cumulatively with time, along
47       * with an exponential decay term.       * with an exponential decay term.
# Line 85  public class SingleImage { Line 86  public class SingleImage {
86                      String filename,                      String filename,
87                          float xresolution,                          float xresolution,
88                          float yresolution,                          float yresolution,
                         String filter,  
89                          GL.StatsCallback statsCallback                          GL.StatsCallback statsCallback
90                          ) throws java.io.IOException {                          ) throws java.io.IOException {
91          this.scrollBlock = scrollBlock;          this.scrollBlock = scrollBlock;
# Line 93  public class SingleImage { Line 93  public class SingleImage {
93          this.xresolution = xresolution;          this.xresolution = xresolution;
94          this.yresolution = yresolution;          this.yresolution = yresolution;
95    
96          this.loader = new MipzipLoader(new File(filename));          this.virtualTexture = new VirtualTexture(
97          this.loader.setFilterSettings(filter);                      new MipzipFile(new File(filename)));
98    
99          if(statsCallback != null)          if(statsCallback != null)
100              this.accum = GL.createTexAccum(statsCallback, this);              this.accum = GL.createTexAccum(statsCallback, this);
101          else          else
# Line 103  public class SingleImage { Line 104  public class SingleImage {
104          if(dbg) p("Create single image: "+scrollBlock+" "+page+" "+filename          if(dbg) p("Create single image: "+scrollBlock+" "+page+" "+filename
105                      +" "+xresolution+" "+yresolution+" "+statsCallback);                      +" "+xresolution+" "+yresolution+" "+statsCallback);
106    
107          this.missingPixels = new double[this.loader.getNLevels()];          this.missingPixels = new double[
108                    this.virtualTexture.mipzipFile.getNLevels()];
109      }      }
110    
111      public void finalize() {      public void finalize() {

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

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