Exemple #1
0
        public static Canvas Receive(Lidgren.Network.NetIncomingMessage message, Palette pal)
        {
            var width  = message.ReadVariableInt32();
            var height = message.ReadVariableInt32();

            message.ReadPadBits();
            var stream = message.ReadStream();

            var canvas = new MemoryCanvas(new Size(width, height));

            Pablo.Load(stream, canvas, pal);
            return(canvas);
        }
        public override void Receive(ReceiveCommandArgs args)
        {
            base.Receive(args);
            ICEColours = args.Message.ReadBoolean();
            Use9x      = args.Message.ReadBoolean();
            DosAspect  = args.Message.ReadBoolean();
            var page       = Pages[0];
            var canvasSize = args.Message.ReadSize();

            args.Message.ReadPadBits();
            page.Canvas.ResizeCanvas(canvasSize, false);
            var stream = args.Message.ReadStream();
            var type   = new Types.Pablo(Info);

            resizeCanvas = !EditMode;
            type.Load(stream, this, null);
            if (Use9x)
            {
                SetFont(false);
            }
        }