enikey | 970eb52 | 2008-12-25 07:46:04 +0000 | [diff] [blame^] | 1 | package com.tightvnc.decoder; |
| 2 | |
| 3 | import com.tightvnc.vncviewer.RfbInputStream; |
| 4 | import java.awt.Graphics; |
| 5 | import java.io.IOException; |
| 6 | |
| 7 | // |
| 8 | // Class that used for decoding CopyRect encoded data. |
| 9 | // |
| 10 | |
| 11 | public class CopyRectDecoder extends RawDecoder { |
| 12 | |
| 13 | final static int EncodingCopyRect = 1; |
| 14 | |
| 15 | public CopyRectDecoder(Graphics g, RfbInputStream is) { |
| 16 | super(g, is); |
| 17 | } |
| 18 | |
| 19 | public CopyRectDecoder(Graphics g, RfbInputStream is, int frameBufferW, |
| 20 | int frameBufferH) { |
| 21 | super(g, is, frameBufferW, frameBufferH); |
| 22 | } |
| 23 | |
| 24 | // |
| 25 | // Override handleRect method handle CopyRect |
| 26 | // |
| 27 | |
| 28 | public void handleRect(int x, int y, int w, int h) throws IOException { |
| 29 | |
| 30 | // |
| 31 | // Write encoding ID to record output stream |
| 32 | // |
| 33 | |
| 34 | if (dos != null) { |
| 35 | dos.writeInt(CopyRectDecoder.EncodingCopyRect); |
| 36 | } |
| 37 | |
| 38 | // |
| 39 | // TODO: Place copy rect handler code here |
| 40 | // |
| 41 | } |
| 42 | } |