/[gzz]/gzz/test/gzz/gfx/gl/pagespanpaper.test
ViewVC logotype

Diff of /gzz/test/gzz/gfx/gl/pagespanpaper.test

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

revision 1.7 by tjl, Tue Feb 4 11:35:44 2003 UTC revision 1.8 by tjl, Mon Feb 10 18:30:15 2003 UTC
# Line 10  from java.lang import Thread Line 10  from java.lang import Thread
10    
11  from test.tools.gfx import *  from test.tools.gfx import *
12    
13    gzz.gfx.gl.PageSpanPaper.paperMill = gzz.gfx.gl.PaperMill.getInstance()
14    gzz.gfx.gl.PageSpanPaper.paperMillWindow = win
15    
16  id = "01ACE8A2E202A26072012715A94A270CD012F9B0F2"  id = "01ACE8A2E202A26072012715A94A270CD012F9B0F2"
17  sc = gzz.media.impl.PageImageScroll(None, gzz.mediaserver.Mediaserver.Id(id))  sc = gzz.media.impl.PageImageScroll(None, gzz.mediaserver.Mediaserver.Id(id))
18    
# Line 52  def checkNonBlank(): Line 55  def checkNonBlank():
55  def checkBlank():  def checkBlank():
56      checkAvgColor(100, 100, 3, 20, (255, 255, 255))      checkAvgColor(100, 100, 3, 20, (255, 255, 255))
57    
58  def checkPaper(bgpaper, blank):  def checkPaper(blank):
59    
60      pagespan = GLSpanner.getSpanRect(sc.getCurrent()).page      pagespan = GLSpanner.getSpanRect(sc.getCurrent()).page
61      p = PageSpanPaper(bgpaper, pagespan)      p = PageSpanPaper(pagespan, 42)
62    
63      pap = p.getPaper(not blank)      pap = p.getPaper(not blank)
64    
# Line 92  def testPaperLoading(): Line 95  def testPaperLoading():
95      """Test that the image gets loaded correctly from GLSpanner.      """Test that the image gets loaded correctly from GLSpanner.
96    
97      """      """
98      checkPaper(None, 1)      checkPaper(0)
99        checkPaper(1)
 def testUnoptimized():  
     """Test that rendering the paper on top of fancy unoptimized  
     paper works.  
   
     """  
   
     checkPaper(PaperMill.getInstance().getPaper(42), 1)  
     checkPaper(PaperMill.getInstance().getPaper(42), 0)  
   
 def testOptimized():  
     """Test that rendering the paper on top of fancy optimized  
     paper works.  
   
     """  
   
     checkPaper(PaperMill.getInstance().getOptimizedPaper(43, win), 1)  
     checkPaper(PaperMill.getInstance().getOptimizedPaper(43, win), 0)  
   
   
 # : vim: set syntax=python :  

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

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