comparison src/myVncClient/VncCanvas.java @ 18:4881586aead9

succeed drawFirstimage()!!
author e085711
date Tue, 26 Apr 2011 09:08:14 +0900
parents f9ecb0315303
children 965360af5f0b
comparison
equal deleted inserted replaced
17:f9ecb0315303 18:4881586aead9
274 synchronized (memImage) { 274 synchronized (memImage) {
275 memImage = viewer.vncContainer.createImage(fbWidth, fbHeight); 275 memImage = viewer.vncContainer.createImage(fbWidth, fbHeight);
276 memGraphics = memImage.getGraphics(); 276 memGraphics = memImage.getGraphics();
277 } 277 }
278 } 278 }
279
279 280
280 // Images with raw pixels should be re-allocated on every change 281 // Images with raw pixels should be re-allocated on every change
281 // of geometry or pixel format. 282 // of geometry or pixel format.
282 if (bytesPixel == 1) { 283 if (bytesPixel == 1) {
283 284
1418 } 1419 }
1419 } 1420 }
1420 } 1421 }
1421 } 1422 }
1422 } 1423 }
1423 1424 /*
1424 handleUpdatedPixels(x, y, w, h); 1425 handleUpdatedPixels(x, y, w, h);
1425 scheduleRepaint(x, y, w, h); 1426 scheduleRepaint(x, y, w, h);
1427 */
1426 } 1428 }
1427 1429
1428 // 1430 //
1429 // Decode 1bpp-encoded bi-color rectangle (8-bit and 24-bit versions). 1431 // Decode 1bpp-encoded bi-color rectangle (8-bit and 24-bit versions).
1430 // 1432 //
1901 1903
1902 repaint(viewer.deferCursorUpdates, cursorX - hotX, cursorY - hotY, 1904 repaint(viewer.deferCursorUpdates, cursorX - hotX, cursorY - hotY,
1903 cursorWidth, cursorHeight); 1905 cursorWidth, cursorHeight);
1904 } 1906 }
1905 } 1907 }
1908 void drawFirstImage()throws IOException {
1909 BufferedImage bimg = rfb.createBimg();
1910 memGraphics.setClip(0,0, rfb.framebufferWidth, rfb.framebufferHeight );
1911 memGraphics.drawImage( bimg, 0,0, null);
1912
1913 }
1906 } 1914 }