28 |
|
|
29 |
import gzz.util.InputEventUtil; |
import gzz.util.InputEventUtil; |
30 |
import gzz.util.JavaIncompat; |
import gzz.util.JavaIncompat; |
31 |
|
import java.awt.image.PixelGrabber; |
32 |
|
|
33 |
/** A single output window. |
/** A single output window. |
34 |
*/ |
*/ |
112 |
VobScene listprev, listnext; |
VobScene listprev, listnext; |
113 |
int[] interplist; |
int[] interplist; |
114 |
|
|
115 |
|
public int[] readPixels(int x, int y, int w, int h) { |
116 |
|
int[] pix = new int[w*h]; |
117 |
|
PixelGrabber pg = new PixelGrabber(cache.getSource(), |
118 |
|
x, y, w, h, pix, 0, w); |
119 |
|
try { |
120 |
|
pg.grabPixels(); |
121 |
|
} catch(InterruptedException e) { |
122 |
|
throw new Error("Interrupted readpixels"); |
123 |
|
} |
124 |
|
return pix; |
125 |
|
} |
126 |
|
|
127 |
/** Renders a frame of the view animation onto Graphics buffer |
/** Renders a frame of the view animation onto Graphics buffer |
128 |
*/ |
*/ |
129 |
void renderAnimImage(VobScene prev, VobScene next, float fract, float lod) { |
void renderAnimImage(VobScene prev, VobScene next, float fract, float lod) { |
256 |
if(useGlobalCache) |
if(useGlobalCache) |
257 |
gr.drawImage(cache, 0, 0, d.width-1, d.height-1, |
gr.drawImage(cache, 0, 0, d.width-1, d.height-1, |
258 |
0, 0, d.width-1, d.height-1, null); |
0, 0, d.width-1, d.height-1, null); |
259 |
else |
else |
260 |
gr.drawImage(cache, 0, 0, null); |
gr.drawImage(cache, 0, 0, null); |
261 |
} |
} |
262 |
public void update(Graphics gr) { |
public void update(Graphics gr) { |
263 |
// Default behaviour overridden because we clear the canvas ourselves |
// Default behaviour overridden because we clear the canvas ourselves |