Mercurial > hg > Applications > AliceVNC
diff src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveUpdateRectangle.java @ 4:9a24e36d8ed7
use constructor for setting parms
author | YU |
---|---|
date | Sat, 13 Sep 2014 19:57:00 +0900 |
parents | e046eb8a3ac1 |
children | c05d3b89b446 |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveUpdateRectangle.java Sat Sep 13 19:48:08 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveUpdateRectangle.java Sat Sep 13 19:57:00 2014 +0900 @@ -1,6 +1,7 @@ package jp.ac.u_ryukyu.alicevnc; import com.glavsoft.exceptions.TransportException; +import com.glavsoft.rfb.encoding.EncodingType; import com.glavsoft.rfb.encoding.decoder.DecodeInfo; import com.glavsoft.rfb.encoding.decoder.FramebufferUpdateRectangle; import com.glavsoft.rfb.encoding.decoder.ZRLEDecoder; @@ -26,12 +27,10 @@ try { decoder.decode(decodeInfo, holder.renderer); - FramebufferUpdateRectangle rect = new FramebufferUpdateRectangle(); - rect.x = decodeInfo.x; - rect.y = decodeInfo.y; - rect.height = decodeInfo.height; - rect.width = decodeInfo.width; - rect.encodingType = decodeInfo.encodingType; + FramebufferUpdateRectangle rect = new FramebufferUpdateRectangle( + decodeInfo.x, decodeInfo.y, decodeInfo.width, decodeInfo.height); + + rect.encodingType = EncodingType.byId(decodeInfo.encodingTypeId); holder.repaintController.repaintBitmap(rect); } catch (TransportException e) {