summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/src/com/tightvnc/decoder/CopyRectDecoder.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/java/src/com/tightvnc/decoder/CopyRectDecoder.java b/java/src/com/tightvnc/decoder/CopyRectDecoder.java
new file mode 100644
index 00000000..3fceb631
--- /dev/null
+++ b/java/src/com/tightvnc/decoder/CopyRectDecoder.java
@@ -0,0 +1,42 @@
+package com.tightvnc.decoder;
+
+import com.tightvnc.vncviewer.RfbInputStream;
+import java.awt.Graphics;
+import java.io.IOException;
+
+//
+// Class that used for decoding CopyRect encoded data.
+//
+
+public class CopyRectDecoder extends RawDecoder {
+
+ final static int EncodingCopyRect = 1;
+
+ public CopyRectDecoder(Graphics g, RfbInputStream is) {
+ super(g, is);
+ }
+
+ public CopyRectDecoder(Graphics g, RfbInputStream is, int frameBufferW,
+ int frameBufferH) {
+ super(g, is, frameBufferW, frameBufferH);
+ }
+
+ //
+ // Override handleRect method handle CopyRect
+ //
+
+ public void handleRect(int x, int y, int w, int h) throws IOException {
+
+ //
+ // Write encoding ID to record output stream
+ //
+
+ if (dos != null) {
+ dos.writeInt(CopyRectDecoder.EncodingCopyRect);
+ }
+
+ //
+ // TODO: Place copy rect handler code here
+ //
+ }
+}