changeset 11:aff2d0bb9c50

Viewable multi display
author YU
date Thu, 18 Sep 2014 21:37:03 +0900
parents 65d989192d63
children 66c06ebbced1
files src/main/java/jp/ac/u_ryukyu/alicevnc/MyServerInitMessage.java src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveUpdateRectangle.java
diffstat 2 files changed, 2 insertions(+), 68 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/alicevnc/MyServerInitMessage.java	Thu Sep 18 21:07:46 2014 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-package jp.ac.u_ryukyu.alicevnc;
-
-import org.msgpack.annotation.Message;
-
-import com.glavsoft.rfb.encoding.PixelFormat;
-import com.glavsoft.rfb.encoding.ServerInitMessage;
-
-@Message
-public class MyServerInitMessage {
-    public int width;
-    public int height;
-    public String name;
-    
-    // pixel format info
-    public byte bitsPerPixel;
-    public byte depth;
-    public byte bigEndianFlag;
-    public byte trueColourFlag;
-    public short redMax;
-    public short greenMax;
-    public short blueMax;
-    public byte redShift;
-    public byte greenShift;
-    public byte blueShift;
-    
-    public MyServerInitMessage(){
-        
-    }
-
-    public MyServerInitMessage(ServerInitMessage serverInitMessage) {
-        height = serverInitMessage.getFrameBufferHeight();
-        width = serverInitMessage.getFrameBufferWidth();
-        name = serverInitMessage.getName();
-        PixelFormat pixelFormat = serverInitMessage.getPixelFormat();
-        bitsPerPixel = pixelFormat.bitsPerPixel;
-        depth = pixelFormat.depth;
-        bigEndianFlag = pixelFormat.bigEndianFlag;
-        trueColourFlag = pixelFormat.trueColourFlag;
-        redMax = pixelFormat.redMax;
-        greenMax = pixelFormat.greenMax;
-        blueMax = pixelFormat.blueMax;
-        redShift = pixelFormat.redShift;
-        greenShift = pixelFormat.greenShift;
-        blueShift = pixelFormat.blueShift;
-    }
-    
-    public PixelFormat getPixelFormat(){
-        PixelFormat pixelFormat = new PixelFormat();
-        
-        pixelFormat.bitsPerPixel = bitsPerPixel;
-        pixelFormat.depth = depth;
-        pixelFormat.bigEndianFlag = bigEndianFlag;
-        pixelFormat.trueColourFlag = trueColourFlag;
-        pixelFormat.redMax = redMax;
-        pixelFormat.greenMax = greenMax;
-        pixelFormat.blueMax = blueMax;
-        pixelFormat.redShift = redShift;
-        pixelFormat.greenShift = greenShift;
-        pixelFormat.blueShift = blueShift;
-        
-        return pixelFormat;
-    }
-}
--- a/src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveUpdateRectangle.java	Thu Sep 18 21:07:46 2014 +0900
+++ b/src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveUpdateRectangle.java	Thu Sep 18 21:37:03 2014 +0900
@@ -37,16 +37,13 @@
                         message.x, message.y, message.width, message.height);
 
                 rect.encodingType = EncodingType.byId(message.encodingTypeId);
-
                 holder.getRepaintController().repaintBitmap(rect);
 
 
-            } else if (message.getEncodingType() == EncodingType.DESKTOP_SIZE) {
-
-                
+            } else if (message.getEncodingType() == EncodingType.DESKTOP_SIZE) {         
                 holder.setRenderer(
                         holder.getRepaintController().createRenderer(null ,message.width, 
-                                message.height, holder.getRenderer().pixelFormat)
+                                message.height, message.getPixelFormat())
                                 );