[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ff-cvs] fenfire/org/fenfire/spanimages/gl PageScrollBlo...
From: |
Tuomas J. Lukka |
Subject: |
[ff-cvs] fenfire/org/fenfire/spanimages/gl PageScrollBlo... |
Date: |
Mon, 18 Aug 2003 04:07:08 -0400 |
CVSROOT: /cvsroot/fenfire
Module name: fenfire
Branch:
Changes by: Tuomas J. Lukka <address@hidden> 03/08/18 04:07:08
Modified files:
org/fenfire/spanimages/gl: PageScrollBlockImager.java
Log message:
Aniso test
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/fenfire/fenfire/org/fenfire/spanimages/gl/PageScrollBlockImager.java.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
Patches:
Index: fenfire/org/fenfire/spanimages/gl/PageScrollBlockImager.java
diff -u fenfire/org/fenfire/spanimages/gl/PageScrollBlockImager.java:1.9
fenfire/org/fenfire/spanimages/gl/PageScrollBlockImager.java:1.10
--- fenfire/org/fenfire/spanimages/gl/PageScrollBlockImager.java:1.9 Mon Aug
18 04:02:13 2003
+++ fenfire/org/fenfire/spanimages/gl/PageScrollBlockImager.java Mon Aug
18 04:07:08 2003
@@ -32,7 +32,7 @@
import org.python.util.*;
import org.python.core.*;
import java.awt.image.*;
-import java.awt.Dimension.*;
+import java.awt.Dimension;
import java.io.*;
import java.util.*;
@@ -128,9 +128,12 @@
float inchWidth = maxw / 72.0f;
float inchHeight = maxh / 72.0f;
- // int hreso = MAXTEXSIZE
+ int xreso = (int)(MAXTEXSIZE / inchWidth);
+ int yreso = (int)(MAXTEXSIZE / inchHeight);
- String prefix = protectChars(pages.getID()) + "-" + RESOLUTION + "-";
+ String resolution = ""+xreso+"x"+yreso;
+
+ String prefix = protectChars(pages.getID()) + "-" + resolution + "-";
String[] tmppaths = new String[n];
String[] paths = new String[n];
@@ -160,14 +163,16 @@
if(! interp.get("cv").__call__(new PyObject[] {
new PyString(f.getFilename()),
new PyString(new File(tmp(), "tmp"+prefix).getPath()),
- new PyInteger(RESOLUTION)
+ new PyString(resolution)
}).__nonzero__())
throw new Error("Conversion unsuccessful");
for(int i=0; i<n; i++) {
interp.get("mz").__call__(new PyObject[] {
new PyString(tmppaths[i]),
- new PyString(paths[i])
+ new PyString(paths[i]),
+ new PyInteger(MAXTEXSIZE),
+ new PyInteger(MAXTEXSIZE)
});
(new File(tmppaths[i])).delete();
}