38 |
public static final String rcsid = "$Id$"; |
public static final String rcsid = "$Id$"; |
39 |
|
|
40 |
public static boolean dbg = false; |
public static boolean dbg = false; |
|
private static void p(String s) { if(dbg) pa(s); } |
|
41 |
private static void pa(String s) { System.out.println(s); } |
private static void pa(String s) { System.out.println(s); } |
42 |
|
|
43 |
public Color fg = Color.black; |
public Color fg = Color.black; |
94 |
*/ |
*/ |
95 |
public void renderAnim(VobScene prev, VobScene next, float fract, float lod, boolean showFinal) { |
public void renderAnim(VobScene prev, VobScene next, float fract, float lod, boolean showFinal) { |
96 |
renderAnimImage(prev, next, fract, lod); |
renderAnimImage(prev, next, fract, lod); |
97 |
|
if(dbg) pa("renderan: "+prev+" "+next+" "+cache); |
98 |
Graphics gr = canvas.getGraphics(); |
Graphics gr = canvas.getGraphics(); |
99 |
if (gr == null) return; |
if (gr == null) return; |
100 |
canvas.paint(gr); |
canvas.paint(gr); |
114 |
|
|
115 |
public int[] readPixels(int x, int y, int w, int h) { |
public int[] readPixels(int x, int y, int w, int h) { |
116 |
int[] pix = new int[w*h]; |
int[] pix = new int[w*h]; |
117 |
|
if(dbg) pa("Readpixels: "+x+" "+y+" "+w+" "+h+" "+cache); |
118 |
PixelGrabber pg = new PixelGrabber(cache.getSource(), |
PixelGrabber pg = new PixelGrabber(cache.getSource(), |
119 |
x, y, w, h, pix, 0, w); |
x, y, w, h, pix, 0, w); |
120 |
try { |
try { |
177 |
fract = 1-fract; |
fract = 1-fract; |
178 |
} |
} |
179 |
if(osc == null) osc = sc; |
if(osc == null) osc = sc; |
180 |
p("Going to render: "+sc+" "+osc+" "+fract); |
if(dbg) pa("Going to render: "+sc+" "+osc+" "+fract); |
181 |
if(dbg) sc.dump(); |
if(dbg) sc.dump(); |
182 |
if(dbg) osc.dump(); |
if(dbg) osc.dump(); |
183 |
|
|
201 |
|
|
202 |
|
|
203 |
public void zzProcessEvent(AWTEvent e) { |
public void zzProcessEvent(AWTEvent e) { |
204 |
if(dbg) p("ZZProcessEvent "+e); |
if(dbg) pa("ZZProcessEvent "+e); |
205 |
if(e instanceof KeyEvent) { |
if(e instanceof KeyEvent) { |
206 |
KeyEvent ke = (KeyEvent)e; |
KeyEvent ke = (KeyEvent)e; |
207 |
String name = InputEventUtil.getKeyEventName(ke); |
String name = InputEventUtil.getKeyEventName(ke); |