Ejemplo n.º 1
0
		public EncodedRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle, int encoding)
		{
			this.rfb = rfb;
			this.framebuffer = framebuffer;
			this.rectangle = rectangle;

			//Select appropriate reader
			BinaryReader reader = (encoding == RfbProtocol.ZRLE_ENCODING) ? rfb.ZrleReader : rfb.Reader;

			// Create the appropriate PixelReader depending on screen size and encoding
			switch (framebuffer.BitsPerPixel)
			{
				case 32:
					if (encoding == RfbProtocol.ZRLE_ENCODING)
					{
						preader = new CPixelReader(reader, framebuffer);
					}
					else
					{
						preader = new PixelReader32(reader, framebuffer);
					}
					break;
				case 16:
					preader = new PixelReader16(reader, framebuffer);
					break;
				case 8:
					preader = new PixelReader8(reader, framebuffer, rfb);
					break;
				default:
					throw new ArgumentOutOfRangeException("BitsPerPixel", framebuffer.BitsPerPixel, "Valid VNC Pixel Widths are 8, 16 or 32 bits.");
			}
		}
Ejemplo n.º 2
0
		public EncodedRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle)
		{
			this.rfb = rfb;
			this.framebuffer = framebuffer;
			this.rectangle = rectangle;

			// Create the appropriate PixelReader depending on screen size
			switch (framebuffer.BitsPerPixel) {
				case 32:
					preader = new PixelReader32(rfb, framebuffer);
					break;
				case 16:
					preader = new PixelReader16(rfb, framebuffer);
					break;
				case 8:
					preader = new PixelReader8(rfb, framebuffer);
					break;
				default:
					throw new ArgumentOutOfRangeException("BitsPerPixel", framebuffer.BitsPerPixel, "Valid VNC Pixel Widths are 8, 16, or 32 bits.");
			}
		}
Ejemplo n.º 3
0
 public CoRRE(RfbProtocol rfb, Framebuffer framebuffer, int[] pixels, Rectangle rectangle)
     : base(rfb, framebuffer, pixels, rectangle)
 {
     this.pixels = pixels;
 }
Ejemplo n.º 4
0
		public RawRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle)
			: base(rfb, framebuffer, rectangle, RfbProtocol.RAW_ENCODING)
		{
		}
Ejemplo n.º 5
0
 public RreRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle)
     : base(rfb, framebuffer, rectangle, RfbEncodingType.RRE)
 {
 }
Ejemplo n.º 6
0
		public RawRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle) : base(rfb, framebuffer, rectangle)
		{
		}
Ejemplo n.º 7
0
		public PixelReader8(BinaryReader reader, Framebuffer framebuffer, RfbProtocol rfb) : base(reader, framebuffer)
		{
			this.rfb = rfb;
		}
Ejemplo n.º 8
0
 public CoRreRectangle(RfbProtocol rfb, Framebuffer framebuffer, int[] pixels, Rectangle rectangle)
     : base(rfb, framebuffer, rectangle, RfbProtocol.Encoding.CORRE_ENCODING)
 {
     this.pixels = pixels;
 }
Ejemplo n.º 9
0
 public EncodedRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle, RfbProtocol.Encoding encoding)
 {
     this.rfb = rfb;
     this.framebuffer = framebuffer;
     this.rectangle = rectangle;
 }
Ejemplo n.º 10
0
 public HextileRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle)
     : base(rfb, framebuffer, rectangle, RfbProtocol.HEXTILE_ENCODING)
 {
 }
Ejemplo n.º 11
0
        private Object[] tiles; // each element either Tile or byte[]

        #endregion Fields

        #region Constructors

        public HextileRectangle(RfbProtocol rfb, Framebuffer framebuffer, int[] pixels, Rectangle rectangle)
            : base(rfb, framebuffer, rectangle, RfbProtocol.Encoding.HEXTILE_ENCODING)
        {
            this.pixels = pixels;
        }
Ejemplo n.º 12
0
 public PixelReader8(BinaryReader reader, Framebuffer framebuffer, RfbProtocol rfb) : base(reader, framebuffer)
 {
     this.rfb = rfb;
 }
Ejemplo n.º 13
0
 public CopyRectRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle)
     : base(rfb, framebuffer, rectangle, RfbEncodingType.CopyRect)
 {
 }
Ejemplo n.º 14
0
 public PixelReader16(RfbProtocol rfb, Framebuffer framebuffer) : base(rfb, framebuffer)
 {
 }
Ejemplo n.º 15
0
 public TightRectangle(RfbProtocol rfbProtocol, Framebuffer framebuffer, Rectangle rectangle) : base(rfbProtocol,
                                                                                                     framebuffer, rectangle, RfbProtocol.TIGHT_ENCODING)
 {
 }
Ejemplo n.º 16
0
		public ZrleRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle)
			: base(rfb, framebuffer, rectangle, RfbProtocol.ZRLE_ENCODING)
		{
		}
 // support for local cursor handling. Changing the local cursor does not work in 800xA framework,
 // but looks better than the "double mouse" effect
 public CursorRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle)
     : base(rfb, framebuffer, rectangle, RfbProtocol.CURSOR_PSEUDO_ENCODING)
 {
 }
Ejemplo n.º 18
0
 public RreRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle)
     : base(rfb, framebuffer, rectangle, RfbProtocol.RRE_ENCODING)
 {
 }
Ejemplo n.º 19
0
		public HextileRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle)
			: base(rfb, framebuffer, rectangle, RfbProtocol.HEXTILE_ENCODING) 
		{
		}
 public CoRreRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle) : base(rfb, framebuffer, rectangle)
 {
 }
Ejemplo n.º 21
0
		public PixelReader16(RfbProtocol rfb, Framebuffer framebuffer) : base(rfb, framebuffer)
		{
		}
Ejemplo n.º 22
0
 public CopyRectRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle)
     : base(rfb, framebuffer, rectangle, RfbProtocol.COPYRECT_ENCODING)
 {
 }
Ejemplo n.º 23
0
		public CoRreRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle) : base(rfb, framebuffer, rectangle, RfbProtocol.CORRE_ENCODING)
		{
		}
Ejemplo n.º 24
0
		protected PixelReader(RfbProtocol rfb, Framebuffer framebuffer)
		{
			this.rfb = rfb;
			this.framebuffer = framebuffer;
		}
Ejemplo n.º 25
0
		public CopyRectRectangle(RfbProtocol rfb, Framebuffer framebuffer, Rectangle rectangle)
			: base(rfb, framebuffer, rectangle, RfbProtocol.COPYRECT_ENCODING) 
		{
		}
Ejemplo n.º 26
0
 public CopyRectRectangle(RfbProtocol rfb, Framebuffer framebuffer, int[] pixels, Rectangle rectangle)
     : base(rfb, framebuffer, rectangle, RfbProtocol.Encoding.COPYRECT_ENCODING)
 {
 }