From 970eb52477950029395c40df97b6f14020165234 Mon Sep 17 00:00:00 2001 From: enikey Date: Thu, 25 Dec 2008 07:46:04 +0000 Subject: [Layout, developement] Added base copy rect decoder class. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3460 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- java/src/com/tightvnc/decoder/CopyRectDecoder.java | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 java/src/com/tightvnc/decoder/CopyRectDecoder.java 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 + // + } +} -- cgit v1.2.3