/[gzz]/gzz/gzz/vob/TextVob.java
ViewVC logotype

Diff of /gzz/gzz/vob/TextVob.java

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

revision 1.26 by benja, Sat Sep 21 21:49:04 2002 UTC revision 1.27 by tjl, Mon Sep 23 08:24:26 2002 UTC
# Line 21  TextVob.java Line 21  TextVob.java
21   * Written by Benja Fallenstein and Tuomas Lukka   * Written by Benja Fallenstein and Tuomas Lukka
22   */   */
23  package gzz.vob;  package gzz.vob;
24  import gzz.gfx.gl.GZZGL;  import gzz.gfx.gl.GLRen;
25  import java.awt.Rectangle;  import java.awt.Rectangle;
26  import java.awt.Shape;  import java.awt.Shape;
27  import gzz.client.*;  import gzz.client.*;
# Line 105  String rcsid = "$Id$"; Line 105  String rcsid = "$Id$";
105    
106      /** The OpenGL renderable for this TextVob.      /** The OpenGL renderable for this TextVob.
107       */       */
108      private GZZGL.HorizText ht;      private GLRen.HorizText ht;
109      static Vob cl; // Color callList - XXX Should be removed -      static Vob cl; // Color callList - XXX Should be removed -
110                      // color should come from outside.                      // color should come from outside.
111      public int addToListGL(GraphicsAPI.Window win,      public int addToListGL(GraphicsAPI.Window win,
# Line 116  String rcsid = "$Id$"; Line 116  String rcsid = "$Id$";
116              float sh = 2.0f/style.getHeight(1);              float sh = 2.0f/style.getHeight(1);
117              float sw = 2.0f/style.getWidth(text, 1);              float sw = 2.0f/style.getWidth(text, 1);
118              GLTextStyle gls = (GLTextStyle)style;              GLTextStyle gls = (GLTextStyle)style;
119              ht = GZZGL.createHorizText(              ht = GLRen.createHorizText(
120                      gls.theFont,                      gls.theFont,
121                      text,                      text,
122                      -1, 0.7f, -1f,                      -1, 0.7f, -1f,
123                      sw * gls.fontScale, sh * gls.fontScale);                      sw * gls.fontScale, sh * gls.fontScale);
124          }          }
125          if(cl == null) {          if(cl == null) {
126              cl = GZZGL.createCallList("Color 0 0 0 1");              cl = GLRen.createCallList("Color 0 0 0 1");
127          }          }
128          curs = cl.addToListGL(win, list, curs, coordsys1, 0);          curs = cl.addToListGL(win, list, curs, coordsys1, 0);
129          curs = ht.addToListGL(win, list, curs, coordsys1, 0);          curs = ht.addToListGL(win, list, curs, coordsys1, 0);

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

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