/[gzz]/gzz/gfx/demo/fontfilter.py
ViewVC logotype

Diff of /gzz/gfx/demo/fontfilter.py

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

revision 1.4 by jvk, Wed Jan 29 08:47:14 2003 UTC revision 1.5 by jvk, Wed Jan 29 09:04:01 2003 UTC
# Line 4  from gfx.libpaper.texcache import getCac Line 4  from gfx.libpaper.texcache import getCac
4  import gzz.media.impl  import gzz.media.impl
5  from gfx.util.fparb import dump  from gfx.util.fparb import dump
6  from gfx.libutil.nvcode import parseCombiner  from gfx.libutil.nvcode import parseCombiner
7    from gfx.demo.paper.util import getpaper
8    
9  pis = gzz.media.impl.PageImageScroll(None, gzz.mediaserver.Mediaserver.Id(  pis = gzz.media.impl.PageImageScroll(None, gzz.mediaserver.Mediaserver.Id(
10      "01E1682758ABF63E7833692653A5DE46EA53A6F8AA"))      "01E1682758ABF63E7833692653A5DE46EA53A6F8AA"))
# Line 35  class Scene: Line 35  class Scene:
35              ListIndex("tscaleind", "textscales", 0, "text scale", "D", "d"),              ListIndex("tscaleind", "textscales", 0, "text scale", "D", "d"),
36              Toggle("texfilt", 1, "texture filtering", "f"),              Toggle("texfilt", 1, "texture filtering", "f"),
37              Action("Invert biases", "t", self.inv, noAnimation=1),              Action("Invert biases", "t", self.inv, noAnimation=1),
38                SlideLin("seed", 0, 1, "paper seed", "P", "p"),
39          )          )
40            self.prevseed = 0
41    
42      def scene(self, vs):      def scene(self, vs):
43          putnoc(vs, background((.5,.8,.5)))          putnoc(vs, background((.5,.8,.5)))
44    
45            if self.prevseed != self.seed:
46                if self.seed: self.pq = getpaper(self.seed)
47                self.prevseed = self.seed
48    
49          rot = vs.rotateCS(0, "r", self.ang)          rot = vs.rotateCS(0, "r", self.ang)
50          d = 1. / self.ps          d = 1. / self.ps
51          csg = vs.affineCS(rot, "g", 0, self.xg, self.yg,          csg = vs.affineCS(rot, "g", 0, self.xg, self.yg,
52              self.ps, 0, 0, self.ps)              self.ps, 0, 0, self.ps)
53    
54            if self.seed:
55                vs.map.put(self.pq, csg, 0)
56    
57    
58          if self.texfilt:          if self.texfilt:
59                  minfilt = "LINEAR_MIPMAP_LINEAR"                  minfilt = "LINEAR_MIPMAP_LINEAR"
60                  magfilt = "LINEAR"                  magfilt = "LINEAR"
# Line 115  class Scene: Line 125  class Scene:
125          cs1 = vs.affineCS(rot, "1", 0, self.x, self.y,          cs1 = vs.affineCS(rot, "1", 0, self.x, self.y,
126              600, 0, 0, 600)              600, 0, 0, 600)
127    
   
128          sharp = .5 + .5 * self.sharpness          sharp = .5 + .5 * self.sharpness
129          scale = self.scales[self.scaleind]          scale = self.scales[self.scaleind]
130          s = 1          s = 1

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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