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

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

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

revision 1.39 by jvk, Tue Oct 8 12:34:13 2002 UTC revision 1.40 by jvk, Tue Oct 8 15:12:29 2002 UTC
# Line 106  def getText(text): Line 106  def getText(text):
106      global textstyle      global textstyle
107      if not textstyle:      if not textstyle:
108          textstyle = GLTextStyle.create("sans", 0, 1)          textstyle = GLTextStyle.create("sans", 0, 1)
109      return TextVob(textstyle, text, 0)      return TextVob(textstyle, text, 1)
110    
111  def putText(vs, cs1, text, color = None, x = 0, y = 0, z = 0, h = 10):  def putText(vs, cs1, text, color = None, x = 0, y = 0, z = 0, h = 1, key = None):
112      if color != None:          if color != None:    
113          putnoc(vs, getDListNocoords("Color " + js(color)))          putnoc(vs, getDListNocoords("Color " + js(color)))
114      putnoc(vs, getDListNocoords("""      putnoc(vs, getDListNocoords("""
# Line 123  def putText(vs, cs1, text, color = None, Line 123  def putText(vs, cs1, text, color = None,
123      t = getText(text)      t = getText(text)
124    
125      cs = vs.coords.coordsys(cs1, z, x, y-h, h, h)      cs = vs.coords.coordsys(cs1, z, x, y-h, h, h)
126      vs.matcher.addSub(cs1, cs, str(text))      vs.matcher.addSub(cs1, cs, key or str(text))
127    
128      vs.map.put(t, cs)      vs.map.put(t, cs)
129            

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

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