From 32b421b0127ef100d44f9085b2cb17ee694bff1d Mon Sep 17 00:00:00 2001 From: enikey Date: Thu, 25 Dec 2008 08:03:49 +0000 Subject: [Developement] Add copyrect handler code to copyrect decoder. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3463 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- java/src/com/tightvnc/decoder/CopyRectDecoder.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'java/src/com') diff --git a/java/src/com/tightvnc/decoder/CopyRectDecoder.java b/java/src/com/tightvnc/decoder/CopyRectDecoder.java index 3fceb631..07a14bdb 100644 --- a/java/src/com/tightvnc/decoder/CopyRectDecoder.java +++ b/java/src/com/tightvnc/decoder/CopyRectDecoder.java @@ -35,8 +35,16 @@ public class CopyRectDecoder extends RawDecoder { dos.writeInt(CopyRectDecoder.EncodingCopyRect); } - // - // TODO: Place copy rect handler code here - // + int copyRectSrcX = rfbis.readU16(); + int copyRectSrcY = rfbis.readU16(); + + // If the session is being recorded: + if (dos != null) { + dos.writeShort(copyRectSrcX); + dos.writeShort(copyRectSrcY); + } + + graphics.copyArea(copyRectSrcX, copyRectSrcY, w, h, + x - copyRectSrcX, y - copyRectSrcY); } } -- cgit v1.2.3