gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz gfx/demo/gldemo.py gzz/modules/pp/demotest.py


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz gfx/demo/gldemo.py gzz/modules/pp/demotest.py
Date: Tue, 08 Oct 2002 07:04:07 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/10/08 07:04:07

Modified files:
        gfx/demo       : gldemo.py 
        gzz/modules/pp : demotest.py 

Log message:
        x,y,w for text

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/gldemo.py.diff?tr1=1.37&tr2=1.38&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/demotest.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: gzz/gfx/demo/gldemo.py
diff -c gzz/gfx/demo/gldemo.py:1.37 gzz/gfx/demo/gldemo.py:1.38
*** gzz/gfx/demo/gldemo.py:1.37 Tue Oct  8 06:49:25 2002
--- gzz/gfx/demo/gldemo.py      Tue Oct  8 07:04:07 2002
***************
*** 108,114 ****
        textstyle = GLTextStyle.create("sans", 0, 1)
      return TextVob(textstyle, text, 0)
  
! def putText(vs, cs1, text, color = None):
      if color != None:    
          putnoc(vs, getDListNocoords("Color " + js(color)))
      putnoc(vs, getDListNocoords("""
--- 108,114 ----
        textstyle = GLTextStyle.create("sans", 0, 1)
      return TextVob(textstyle, text, 0)
  
! def putText(vs, cs1, text, color = None, x = 0, y = 0, h = 10):
      if color != None:    
          putnoc(vs, getDListNocoords("Color " + js(color)))
      putnoc(vs, getDListNocoords("""
***************
*** 121,127 ****
      """))
  
      t = getText(text)
!     vs.map.put(t, cs1)
      
      putnoc(vs, getDListNocoords("""
          PopAttrib
--- 121,131 ----
      """))
  
      t = getText(text)
! 
!     cs = vs.coords.coordsys(cs1, 0, x, y-h, h, h)
!     vs.matcher.addSub(cs1, cs, str(text))
! 
!     vs.map.put(t, cs)
      
      putnoc(vs, getDListNocoords("""
          PopAttrib
Index: gzz/gzz/modules/pp/demotest.py
diff -c gzz/gzz/modules/pp/demotest.py:1.5 gzz/gzz/modules/pp/demotest.py:1.6
*** gzz/gzz/modules/pp/demotest.py:1.5  Tue Oct  8 06:25:40 2002
--- gzz/gzz/modules/pp/demotest.py      Tue Oct  8 07:04:07 2002
***************
*** 33,48 ****
  clip = GLRen.createClipSquare()
  stopclip = GLRen.createStopClipSquare()
  
  class PlaneViewScene:
      def __init__(self):
        self.pv = PlaneView(VobKeyer())
        self.scale = 0.01
      def scene(self, vs):
!       bf = effects.CircleFloater4(vs, 0, (500, 400), 300, (000,300))
  
        vs.map.put(background((0.4,0.5,0.8)))
        # Viewport
!       self.cs1 = vs.coords.affineCoordsys(0, 0, 100, 100, 600, 0, 0, 600)
        # Paper to viewport
        self.cs2 = vs.coords.affineCoordsys(0, 0, 0, 0, self.scale, 0, 0, 
self.scale)
        vs.matcher.add(self.cs1, "Global")
--- 33,55 ----
  clip = GLRen.createClipSquare()
  stopclip = GLRen.createStopClipSquare()
  
+ lineconn = GLRen.createLineConnector(-10, -10)
+ 
  class PlaneViewScene:
      def __init__(self):
        self.pv = PlaneView(VobKeyer())
        self.scale = 0.01
      def scene(self, vs):
!       dim = vs.getSize()
! 
!       ctr = (dim.width/2, dim.height/2)
!       (w,h) = 600, 500
! 
!       bf = effects.CircleFloater4(vs, 0, ctr, 300, (0,ctr[1]))
  
        vs.map.put(background((0.4,0.5,0.8)))
        # Viewport
!       self.cs1 = vs.coords.coordsys(0, 0, ctr[0]-w/2, ctr[1]-h/2, w, h)
        # Paper to viewport
        self.cs2 = vs.coords.affineCoordsys(0, 0, 0, 0, self.scale, 0, 0, 
self.scale)
        vs.matcher.add(self.cs1, "Global")
***************
*** 59,67 ****
      
        flo = bf.buoyCoordsys(anchor, "FOO")
        (w,h) = (100,100)
!       mag = vs.coords.coordsys(flo, -5, -w, -h, w, h)
  
        vs.map.put(coloredQuad((1,0,0)), mag)
  
        self.currentvs = vs
      def key(self, key):
--- 66,81 ----
      
        flo = bf.buoyCoordsys(anchor, "FOO")
        (w,h) = (100,100)
!       mag = vs.coords.coordsys(flo, -5, -w/2, -h/2, w, h)
  
        vs.map.put(coloredQuad((1,0,0)), mag)
+ 
+       vs.map.put(getDListNocoords("""
+           Color 0 0 0
+           LineWidth 2
+       """))
+ 
+       vs.map.put(lineconn, anchor, flo)
  
        self.currentvs = vs
      def key(self, key):




reply via email to

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