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; }
private static void processLine(RdpPacket data, int present, bool delta) { if ((present & 1) != 0) { LineOrder.Mixmode = data.ReadLittleEndian16(); } if ((present & 2) != 0) { LineOrder.StartX = setCoordinate(data, LineOrder.StartX, delta); } if ((present & 4) != 0) { LineOrder.StartY = setCoordinate(data, LineOrder.StartY, delta); } if ((present & 8) != 0) { LineOrder.EndX = setCoordinate(data, LineOrder.EndX, delta); } if ((present & 0x10) != 0) { LineOrder.EndY = setCoordinate(data, LineOrder.EndY, delta); } if ((present & 0x20) != 0) { LineOrder.BackgroundColor = setColor(data); } if ((present & 0x40) != 0) { LineOrder.Opcode = data.ReadByte(); } present = present >> 7; if ((present & 1) != 0) { LineOrder.PenStyle = data.ReadByte(); } if ((present & 2) != 0) { LineOrder.PenWidth = data.ReadByte(); } if ((present & 4) != 0) { LineOrder.PenColor = setColor(data); } LineOrder.drawLineOrder(); }
internal static void drawPolyLineOrder() { Options.Enter(); try { int x = X; int y = Y; int penColor = PenColor; int dataSize = DataSize; byte[] data = Data; int lines = Lines; int offset = ((lines - 1) / 4) + 1; int num7 = 0; int num8 = 0; int opcode = Opcode - 1; for (int i = 0; (i < lines) && (offset < dataSize); i++) { int num11 = x; int num12 = y; if ((i % 4) == 0) { num7 = data[num8++]; } if ((num7 & 0xc0) == 0) { num7 |= 0xc0; } if ((num7 & 0x40) != 0) { x += parse_delta(data, ref offset); } if ((num7 & 0x80) != 0) { y += parse_delta(data, ref offset); } ChangedRect.Invalidate(num11, num12, x - num11, y - num12); LineOrder.drawLine(num11, num12, x, y, penColor, opcode); num7 = num7 << 2; } } finally { Options.Exit(); } }