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

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

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

revision 1.9 by tjl, Mon Aug 18 08:02:13 2003 UTC revision 1.10 by tjl, Mon Aug 18 08:07:08 2003 UTC
# Line 32  import org.nongnu.storm.*; Line 32  import org.nongnu.storm.*;
32  import org.python.util.*;  import org.python.util.*;
33  import org.python.core.*;  import org.python.core.*;
34  import java.awt.image.*;  import java.awt.image.*;
35  import java.awt.Dimension.*;  import java.awt.Dimension;
36  import java.io.*;  import java.io.*;
37  import java.util.*;  import java.util.*;
38    
# Line 128  public class PageScrollBlockImager exten Line 128  public class PageScrollBlockImager exten
128          float inchWidth = maxw / 72.0f;          float inchWidth = maxw / 72.0f;
129          float inchHeight = maxh / 72.0f;          float inchHeight = maxh / 72.0f;
130    
131          // int hreso = MAXTEXSIZE          int xreso = (int)(MAXTEXSIZE / inchWidth);
132            int yreso = (int)(MAXTEXSIZE / inchHeight);
133    
134          String prefix = protectChars(pages.getID()) + "-" + RESOLUTION + "-";          String resolution = ""+xreso+"x"+yreso;
135    
136            String prefix = protectChars(pages.getID()) + "-" + resolution + "-";
137    
138          String[] tmppaths = new String[n];          String[] tmppaths = new String[n];
139          String[] paths = new String[n];          String[] paths = new String[n];
# Line 160  public class PageScrollBlockImager exten Line 163  public class PageScrollBlockImager exten
163          if(! interp.get("cv").__call__(new PyObject[] {          if(! interp.get("cv").__call__(new PyObject[] {
164              new PyString(f.getFilename()),              new PyString(f.getFilename()),
165              new PyString(new File(tmp(), "tmp"+prefix).getPath()),              new PyString(new File(tmp(), "tmp"+prefix).getPath()),
166              new PyInteger(RESOLUTION)              new PyString(resolution)
167          }).__nonzero__())          }).__nonzero__())
168              throw new Error("Conversion unsuccessful");              throw new Error("Conversion unsuccessful");
169    
170          for(int i=0; i<n; i++) {          for(int i=0; i<n; i++) {
171              interp.get("mz").__call__(new PyObject[] {              interp.get("mz").__call__(new PyObject[] {
172                  new PyString(tmppaths[i]),                  new PyString(tmppaths[i]),
173                  new PyString(paths[i])                  new PyString(paths[i]),
174                    new PyInteger(MAXTEXSIZE),
175                    new PyInteger(MAXTEXSIZE)
176              });              });
177              (new File(tmppaths[i])).delete();              (new File(tmppaths[i])).delete();
178          }          }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

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