summaryrefslogtreecommitdiffstats
path: root/java/src/com/tightvnc/decoder
diff options
context:
space:
mode:
authorenikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519>2008-12-19 04:45:15 +0000
committerenikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519>2008-12-19 04:45:15 +0000
commit2f811b8e31775b5b54627d9ba4f659d6098d315f (patch)
treec0fc5fb60e8e5432ea45b7a49566795c2a557889 /java/src/com/tightvnc/decoder
parent418611feeee834673bbf004ad87bfcf09bf75f2b (diff)
downloadtigervnc-2f811b8e31775b5b54627d9ba4f659d6098d315f.tar.gz
tigervnc-2f811b8e31775b5b54627d9ba4f659d6098d315f.zip
[Developement] Added constructor, base set methods (setRfbInputStream, setGraphics, setBPP, setFrameBufferSize). Added base protected and private static and non-static members.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3411 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java/src/com/tightvnc/decoder')
-rw-r--r--java/src/com/tightvnc/decoder/RawDecoder.java59
1 files changed, 59 insertions, 0 deletions
diff --git a/java/src/com/tightvnc/decoder/RawDecoder.java b/java/src/com/tightvnc/decoder/RawDecoder.java
index ed2f216c..46d22f7f 100644
--- a/java/src/com/tightvnc/decoder/RawDecoder.java
+++ b/java/src/com/tightvnc/decoder/RawDecoder.java
@@ -1,5 +1,64 @@
package com.tightvnc.decoder;
+import com.tightvnc.vncviewer.RecordInterface;
+import com.tightvnc.vncviewer.RfbInputStream;
+import java.awt.Graphics;
+import java.awt.Image;
+import java.awt.image.ColorModel;
+import java.awt.image.DirectColorModel;
+import java.awt.image.MemoryImageSource;
+import java.awt.Color;
+
public class RawDecoder {
+ public RawDecoder(Graphics g, RfbInputStream is) {
+ setGraphics(g);
+ setRfbInputStream(is);
+ cm24 = new DirectColorModel(24, 0xFF0000, 0x00FF00, 0x0000FF);
+ }
+
+ public RawDecoder(Graphics g, RfbInputStream is, int frameBufferW,
+ int frameBufferH) {
+ setGraphics(g);
+ setRfbInputStream(is);
+ setFrameBufferSize(frameBufferW, frameBufferH);
+ cm24 = new DirectColorModel(24, 0xFF0000, 0x00FF00, 0x0000FF);
+ }
+
+ public void setRfbInputStream(RfbInputStream is) {
+ rfbis = is;
+ }
+
+ public void setGraphics(Graphics g) {
+ graphics = g;
+ }
+
+ public void setBPP(int bpp) {
+ bytesPerPixel = bpp;
+ }
+
+ public int getBPP() {
+ return bytesPerPixel;
+ }
+
+ public void setFrameBufferSize(int w, int h) {
+ framebufferWidth = w;
+ framebufferHeight = h;
+ }
+
+ protected int bytesPerPixel = 4;
+ protected int framebufferWidth = 0;
+ protected int framebufferHeight = 0;
+ protected RfbInputStream rfbis = null;
+ protected Graphics graphics = null;
+ protected RecordInterface rec = null;
+
+ protected static byte []pixels8 = null;
+ protected static int []pixels24 = null;
+ protected static MemoryImageSource pixelsSource = null;
+ protected static Image rawPixelsImage = null;
+
+ private static ColorModel cm8 = null;
+ private static ColorModel cm24 = null;
+ private static Color []color256 = null;
}