/[gzz]/gzz/gzz/gfx/gl/PageSpanPaper.java
ViewVC logotype

Diff of /gzz/gzz/gfx/gl/PageSpanPaper.java

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

revision 1.8 by tjl, Tue Feb 4 13:47:54 2003 UTC revision 1.9 by tjl, Mon Feb 10 18:30:14 2003 UTC
# Line 10  public class PageSpanPaper { Line 10  public class PageSpanPaper {
10      public static boolean dbg = false;      public static boolean dbg = false;
11      private static void pa(String s) { System.out.println(s); }      private static void pa(String s) { System.out.println(s); }
12    
13        public static gzz.gfx.gl.PaperMill paperMill;
14        public static gzz.client.GraphicsAPI.RenderingSurface paperMillWindow;
15    
16      /** The page is in the range (0,0)..(w,h) in paper coordinates.      /** The page is in the range (0,0)..(w,h) in paper coordinates.
17       */       */
18      public final float w, h;      public final float w, h;
# Line 23  public class PageSpanPaper { Line 26  public class PageSpanPaper {
26          return h * p.getY(fullPageY) / p.y1;          return h * p.getY(fullPageY) / p.y1;
27      }      }
28    
     Object identity;  
29      GLSpanner.SpanPage p;      GLSpanner.SpanPage p;
30    
31      Paper bg;      Paper bg;
# Line 75  public class PageSpanPaper { Line 77  public class PageSpanPaper {
77    
78      public static String teardown = null;      public static String teardown = null;
79    
80        int paperSeed;
81    
82      /** Add a pass where the current page image is the only thing.      /** Add a pass where the current page image is the only thing.
83       */       */
84      private void addPaperPass(Paper p, String setup) {      private void addPaperPass(Paper p, String setup) {
# Line 89  public class PageSpanPaper { Line 93  public class PageSpanPaper {
93      }      }
94    
95      public Paper getPaper(boolean withBackground) {      public Paper getPaper(boolean withBackground) {
96          if(withBackground && bg != null) {          if(withBackground) {
97                if(bg == null) {
98                    if(paperMill == null)
99                        throw new Error("Trying to use bg without papermill");
100                    bg = paperMill.getOptimizedPaper(paperSeed, paperMillWindow);
101                }
102              if(bgPaper == null) {              if(bgPaper == null) {
103                  bgPaper = (Paper)bg.clone();                  bgPaper = (Paper)bg.clone();
104                  // Check if we have a single pass and single texture                  // Check if we have a single pass and single texture
# Line 128  public class PageSpanPaper { Line 137  public class PageSpanPaper {
137          p.getTexture(importance, pixels);          p.getTexture(importance, pixels);
138      }      }
139    
140      public PageSpanPaper(Paper background, GLSpanner.SpanPage p) {      public PageSpanPaper(GLSpanner.SpanPage p, int paperSeed) {
141          if(filter == null) {          if(filter == null) {
142              PythonInterpreter jython = new PythonInterpreter();              PythonInterpreter jython = new PythonInterpreter();
143              jython.execfile("gzz/gfx/gl/pagespanpaper.py");              jython.execfile("gzz/gfx/gl/pagespanpaper.py");
144              jython.cleanup();              jython.cleanup();
145          }          }
         this.bg = background;  
         this.identity = identity;  
146          this.p = p;          this.p = p;
147            this.paperSeed = paperSeed;
148    
149          this.w = p.w / 72.0f / 6;          this.w = p.w / 72.0f / 6;
150          this.h = p.h / 72.0f / 6;          this.h = p.h / 72.0f / 6;

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

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