/[gzz]/gzz/gzz/vob/vobs/LineVob.java
ViewVC logotype

Diff of /gzz/gzz/vob/vobs/LineVob.java

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

revision 1.1 by benja, Sat Nov 2 01:23:46 2002 UTC revision 1.2 by tjl, Mon Nov 4 22:15:04 2002 UTC
# Line 1  Line 1 
1  /*    /*  
2  LineVob.java  LineVob.java
3   *       *    
4   *    Copyright (c) 2001, Tuomas Lukka   *    Copyright (c) 2001-2002, Tuomas Lukka
5   *   *
6   *    You may use and distribute under the terms of either the GNU Lesser   *    You may use and distribute under the terms of either the GNU Lesser
7   *    General Public License, either version 2 of the license or,   *    General Public License, either version 2 of the license or,
# Line 23  LineVob.java Line 23  LineVob.java
23  package gzz.vob.vobs;  package gzz.vob.vobs;
24  import gzz.vob.*;  import gzz.vob.*;
25  import java.awt.*;  import java.awt.*;
26    import gzz.gfx.gl.GLCache;
27    
28  /** A plain line drawn in given color.  /** A plain line drawn in given color.
29   */   */
# Line 53  public static final String rcsid = "$Id$ Line 54  public static final String rcsid = "$Id$
54                                  Vob.RenderInfo info2) {                                  Vob.RenderInfo info2) {
55          if(fast) return;          if(fast) return;
56          if(color != null) g.setColor(color);          if(color != null) g.setColor(color);
57          g.drawLine(x0, y0, x1, y1);          g.drawLine(x0, y0, x1, y1); // XXX transform properly
58        }
59    
60        Vob dlist;
61        public int addToListGL(gzz.client.GraphicsAPI.Window win,
62                            int[] list, int curs, int coordsys1,
63                                    int coordsys2) {
64            if(dlist == null)
65                dlist = GLCache.getCallListCoorded(
66                    "Begin LINE_STRIP\nVertex "+x0+" "+y0+
67                        "\nVertex "+x1+" "+y1+"\nEnd\n");
68            curs = dlist.addToListGL(win, list, curs, coordsys1, coordsys2);
69            return curs;
70      }      }
71    
72  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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