blob: 3fceb631b47344631533f7e19515a7b821273c08 [file] [log] [blame]
enikey970eb522008-12-25 07:46:04 +00001package com.tightvnc.decoder;
2
3import com.tightvnc.vncviewer.RfbInputStream;
4import java.awt.Graphics;
5import java.io.IOException;
6
7//
8// Class that used for decoding CopyRect encoded data.
9//
10
11public 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}