Mercurial > hg > Applications > AliceVNC
view src/main/java/jp/ac/u_ryukyu/alicevnc/MyServerInitMessage.java @ 5:c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
author | YU |
---|---|
date | Sat, 13 Sep 2014 20:55:48 +0900 |
parents | 9d932f70b29a |
children |
line wrap: on
line source
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; } }