コード例 #1
0
ファイル: ControlFlow.cs プロジェクト: najachai/RDPUploader
 internal static void resetOrderState()
 {
     Orders.Reset();
     SurfaceClip.Reset();
     DestBltOrder.Reset();
     MultiDestBltOrder.Reset();
     PatBltOrder.Reset();
     MultiPatBltOrder.Reset();
     ScreenBltOrder.Reset();
     MultiScreenBltOrder.Reset();
     MemBltOrder.Reset();
     TriBltOrder.Reset();
     ScreenBltOrder.Reset();
     LineOrder.Reset();
     PolylineOrder.Reset();
     RectangleOrder.Reset();
     MultiRectangleOrder.Reset();
     DeskSaveOrder.Reset();
     Glyph.Reset();
     Cache.Reset(!m_bInitialised);
     Text2Order.Reset();
     Options.BoundsTop    = Options.BoundsLeft = 0;
     Options.BoundsBottom = Options.height - 1;
     Options.BoundsRight  = Options.width - 1;
 }
コード例 #2
0
        private static void processGlyphIndex(RdpPacket data, int present, bool delta)
        {
            if ((present & 1) != 0)
            {
                Text2Order.Font = data.ReadByte();
            }

            if ((present & 2) != 0)
            {
                Text2Order.Flags = data.ReadByte();
            }

            if ((present & 4) != 0)
            {
                Text2Order.Opcode = data.ReadByte();
            }

            if ((present & 8) != 0)
            {
                Text2Order.Mixmode = data.ReadByte();
            }

            if ((present & 0x10) != 0)
            {
                Text2Order.ForegroundColor = setColor(data);
            }

            if ((present & 0x20) != 0)
            {
                Text2Order.BackgroundColor = setColor(data);
            }

            if ((present & 0x40) != 0)
            {
                Text2Order.ClipLeft = data.ReadLittleEndian16();
            }

            if ((present & 0x80) != 0)
            {
                Text2Order.ClipTop = data.ReadLittleEndian16();
            }

            if ((present & 0x100) != 0)
            {
                Text2Order.ClipRight = data.ReadLittleEndian16();
            }

            if ((present & 0x200) != 0)
            {
                Text2Order.ClipBottom = data.ReadLittleEndian16();
            }

            if ((present & 0x400) != 0)
            {
                Text2Order.BoxLeft = data.ReadLittleEndian16();
            }

            if ((present & 0x800) != 0)
            {
                Text2Order.BoxTop = data.ReadLittleEndian16();
            }

            if ((present & 0x1000) != 0)
            {
                Text2Order.BoxRight = data.ReadLittleEndian16();
            }

            if ((present & 0x2000) != 0)
            {
                Text2Order.BoxBottom = data.ReadLittleEndian16();
            }

            parseBrush(data, Text2Order.Brush, present >> 14);

            if ((present & 0x80000) != 0)
            {
                Text2Order.X = data.ReadLittleEndian16();
            }

            if ((present & 0x100000) != 0)
            {
                Text2Order.Y = data.ReadLittleEndian16();
            }

            if ((present & 0x200000) != 0)
            {
                int num = data.ReadByte();
                Text2Order.GlyphLength = num;
                byte[] buffer = new byte[num];
                data.Read(buffer, 0, buffer.Length);
                Text2Order.GlyphIndices = buffer;
            }

            Text2Order.drawText();
        }