/[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.4 by tjl, Mon Jun 23 12:30:42 2003 UTC revision 1.5 by tjl, Mon Jun 23 14:00:36 2003 UTC
# Line 73  public class SingleImage { Line 73  public class SingleImage {
73       *           For example, if a PS file was compiled into an image at       *           For example, if a PS file was compiled into an image at
74       *           160dpi, then this number is 160. Zero or negative = unknown,       *           160dpi, then this number is 160. Zero or negative = unknown,
75       *           use pixel data.       *           use pixel data.
76         * @param statsCallback The callback to give the TexAccum
77       */       */
78      public SingleImage(      public SingleImage(
79                      String scrollBlock, int page,                      String scrollBlock, int page,
80                      String filename,                      String filename,
81                          float resolution) throws java.io.IOException {                          float resolution,
82                            GL.StatsCallback statsCallback
83                            ) throws java.io.IOException {
84          this.scrollBlock = scrollBlock;          this.scrollBlock = scrollBlock;
85          this.page = page;          this.page = page;
86          this.resolution = resolution;          this.resolution = resolution;
87    
88          this.loader = new MipzipLoader(new File(filename));          this.loader = new MipzipLoader(new File(filename));
89          this.accum = GL.createTexAccum();          if(statsCallback != null)
90                this.accum = GL.createTexAccum(statsCallback, this);
91            else
92                this.accum = GL.createTexAccum();
93    
94          this.missingPixels = new double[this.loader.getNLevels()];          this.missingPixels = new double[this.loader.getNLevels()];
95      }      }
# Line 97  public class SingleImage { Line 103  public class SingleImage {
103              nnow += accum.get(i);              nnow += accum.get(i);
104              missingPixels[missingPixels.length-1 - i] += nnow;              missingPixels[missingPixels.length-1 - i] += nnow;
105          }          }
106            if(dbg) p("SingleImage: readTexAccum - total: "+nnow);
107          accum.clear();          accum.clear();
108      }      }
109    
# Line 108  public class SingleImage { Line 115  public class SingleImage {
115          double mul = Math.exp(- exponentialCoeff * msecs);          double mul = Math.exp(- exponentialCoeff * msecs);
116          for(int i=0; i<missingPixels.length; i++)          for(int i=0; i<missingPixels.length; i++)
117              missingPixels[i] *= mul;              missingPixels[i] *= mul;
118            if(dbg) p("SingleImage: updateTime- totalnow: "+nPixels());
119      }      }
120    
121  }  }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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