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, |
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 |
*/ |
*/ |
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 |
} |
} |