comparison src/treeVnc/VncCanvas.java @ 3:3b341997141a

broadcast socket trying
author one
date Mon, 23 Apr 2012 20:18:23 +0900
parents 5d72f4c7371d
children
comparison
equal deleted inserted replaced
2:5d72f4c7371d 3:3b341997141a
964 continue; 964 continue;
965 } 965 }
966 966
967 if (!rle) { 967 if (!rle) {
968 if (palSize == 0) { 968 if (palSize == 0) {
969 System.out.println("mode"+mode);
970 System.out.println(tw+":"+th+":"+ty);
969 readZrleRawPixels(tw, th); 971 readZrleRawPixels(tw, th);
970 } else { 972 } else {
971 readZrlePackedPixels(tw, th, palette, palSize); 973 readZrlePackedPixels(tw, th, palette, palSize);
972 } 974 }
973 } else { 975 } else {
974 if (palSize == 0) { 976 if (palSize == 0) {
975 readZrlePlainRLEPixels(tw, th); 977 readZrlePlainRLEPixels(tw, th);
976 } else { 978 } else {
979 System.out.println("mode"+mode);
980 System.out.println(tw+":"+th+":"+ty);
977 readZrlePackedRLEPixels(tw, th, palette); 981 readZrlePackedRLEPixels(tw, th, palette);
978 } 982 }
979 } 983 }
980 handleUpdatedZrleTile(tx, ty, tw, th); 984 handleUpdatedZrleTile(tx, ty, tw, th);
981 } 985 }
1000 } 1004 }
1001 return pix; 1005 return pix;
1002 } 1006 }
1003 1007
1004 void readPixels(InStream is, int[] dst, int count) throws Exception { 1008 void readPixels(InStream is, int[] dst, int count) throws Exception {
1005 int pix; 1009 // int pix;
1006 if (bytesPixel == 1) { 1010 if (bytesPixel == 1) {
1007 byte[] buf = new byte[count]; 1011 byte[] buf = new byte[count];
1008 is.readBytes(buf, 0, count); 1012 is.readBytes(buf, 0, count);
1009 for (int i = 0; i < count; i++) { 1013 for (int i = 0; i < count; i++) {
1010 dst[i] = (int) buf[i] & 0xFF; 1014 dst[i] = (int) buf[i] & 0xFF;