gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/gfx/util papersampler.py


From: Janne V. Kujala
Subject: [Gzz-commits] gzz/gfx/util papersampler.py
Date: Mon, 03 Mar 2003 09:28:56 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Janne V. Kujala <address@hidden>        03/03/03 09:28:56

Modified files:
        gfx/util       : papersampler.py 

Log message:
        use four conditions: dark/haloed/light/white; first generated texture 
incorrectly has halo!?

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/util/papersampler.py.diff?tr1=1.8&tr2=1.9&r1=text&r2=text

Patches:
Index: gzz/gfx/util/papersampler.py
diff -u gzz/gfx/util/papersampler.py:1.8 gzz/gfx/util/papersampler.py:1.9
--- gzz/gfx/util/papersampler.py:1.8    Mon Mar  3 09:09:54 2003
+++ gzz/gfx/util/papersampler.py        Mon Mar  3 09:28:54 2003
@@ -33,11 +33,18 @@
     def getOptimizedPaper(self, seed, w):
        return self.mill.getOptimizedPaper(seed, w, **self.opts)
 
-lightnesses = [
-       { "numcolors" : 8, "minlum" : 80 },
-        { "numcolors" : 8, "minlum" : 80, "blend" : 0.5 },
-       { "numcolors" : 1, "minlum" : 80 },
-       ]
+pureConds = [
+    { "numcolors" : 8, "minlum" : 80 },
+    { "numcolors" : 8, "minlum" : 80, "blend" : 0.5 },
+    { "numcolors" : 1, "minlum" : 80 },
+    ]
+
+textConds = [
+    { "halo" : 0, "paperopts" : { "numcolors" : 8, "minlum" : 80 } },
+    { "halo" : 1, "paperopts" : { "numcolors" : 8, "minlum" : 80, "blend" : 0 
} },
+    { "halo" : 0, "paperopts" : { "numcolors" : 8, "minlum" : 80, "blend" : 
0.5 } },
+    { "halo" : 0, "paperopts" : { "numcolors" : 8, "minlum" : 80, "blend" : 1 
} },
+    ]
 
 aspect = float(xs)/ys
 
@@ -49,6 +56,8 @@
 
 pages = [enfMaker.makeEnfilade(current.subSpan(i, i+1)) for i in range(0, 
current.length())]
 
+pages = pages[:12] # XXX:
+
 textureSeeds = [i for i in range(523, 523+current.length())]
 
 class PSPMaker(gzz.view.PageSpanCellView.PageSpanPaperMaker):
@@ -82,7 +91,7 @@
 
 def createPurePapers():
     seed = 100
-    for opts in lightnesses:
+    for opts in pureConds:
        for i in range(0,30):
            doFrame(lambda vs: paperscene(vs, seed, opts), 
                        "tmp/tmp%s.png" % seed)
@@ -106,9 +115,10 @@
            page = pages[p]
            zoom = zooms.pop()
            l = 0
-           for opts in lightnesses:
+           for opts in textConds:
+                gzz.gfx.gl.PageSpanPaper.withHalo = opts["halo"]
                gzz.gfx.gl.PageSpanPaper.paperMill = OptMill(
-                                           ThePaperMill(), opts)
+                                           ThePaperMill(), opts["paperopts"])
                gzz.gfx.gl.PageSpanPaper.paperMillWindow = w
                layout = pageSpanCellView.getLayout(page)
                doFrame(lambda vs: textPaperScene(vs, layout, zoom),




reply via email to

[Prev in Thread] Current Thread [Next in Thread]