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; }
internal static void drawMultiPatBltOrder() { int fgcolor = RdpBitmap.convertColor(ForegroundColor); int bgcolor = RdpBitmap.convertColor(BackgroundColor); foreach (Rectangle rectangle in DeltaList) { PatBltOrder.drawPatBltOrder(Opcode, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, fgcolor, bgcolor, Brush); } }
private static void processPatBlt(RdpPacket data, int present, bool delta) { if ((present & 1) != 0) { PatBltOrder.X = setCoordinate(data, PatBltOrder.X, delta); } if ((present & 2) != 0) { PatBltOrder.Y = setCoordinate(data, PatBltOrder.Y, delta); } if ((present & 4) != 0) { PatBltOrder.CX = setCoordinate(data, PatBltOrder.CX, delta); } if ((present & 8) != 0) { PatBltOrder.CY = setCoordinate(data, PatBltOrder.CY, delta); } if ((present & 0x10) != 0) { PatBltOrder.Opcode = ROP2_P(data.ReadByte()); } if ((present & 0x20) != 0) { PatBltOrder.BackgroundColor = setColor(data); } if ((present & 0x40) != 0) { PatBltOrder.ForegroundColor = setColor(data); } parseBrush(data, PatBltOrder.Brush, present >> 7); PatBltOrder.drawPatBltOrder(); }
internal static void drawTriBltOrder() { int x = X; int y = Y; int cX = CX; int cY = CY; int srcX = SrcX; int srcY = SrcY; int boundsRight = (x + cX) - 1; if (boundsRight > Options.BoundsRight) { boundsRight = Options.BoundsRight; } if (x < Options.BoundsLeft) { x = Options.BoundsLeft; } cX = (boundsRight - x) + 1; int boundsBottom = (y + cY) - 1; if (boundsBottom > Options.BoundsBottom) { boundsBottom = Options.BoundsBottom; } if (y < Options.BoundsTop) { y = Options.BoundsTop; } cY = (boundsBottom - y) + 1; srcX += x - X; srcY += y - Y; int fgcolor = RdpBitmap.convertColor(ForegroundColor); int bgcolor = RdpBitmap.convertColor(BackgroundColor); Options.Enter(); try { RdpBitmap bitmap = Cache.getBitmap(CacheID, CacheIDX); if (bitmap != null) { ChangedRect.Invalidate(x, y, cX, cY); switch (Opcode) { case 0x69: RasterOp.do_array(6, Options.Canvas, Options.Canvas.Width, x, y, cX, cY, bitmap.getData(ColorTable), bitmap.getWidth(), srcX, srcY); PatBltOrder.drawPatBltOrder(9, x, y, cX, cY, fgcolor, bgcolor, Brush); return; case 0xb8: PatBltOrder.drawPatBltOrder(6, x, y, cX, cY, fgcolor, bgcolor, Brush); RasterOp.do_array(8, Options.Canvas, Options.Canvas.Width, x, y, cX, cY, bitmap.getData(ColorTable), bitmap.getWidth(), srcX, srcY); PatBltOrder.drawPatBltOrder(6, x, y, cX, cY, fgcolor, bgcolor, Brush); return; case 0xc0: RasterOp.do_array(12, Options.Canvas, Options.Canvas.Width, x, y, cX, cY, bitmap.getData(ColorTable), bitmap.getWidth(), srcX, srcY); PatBltOrder.drawPatBltOrder(8, x, y, cX, cY, fgcolor, bgcolor, Brush); return; } // Unimplemented Triblt opcode: Opcode RasterOp.do_array(12, Options.Canvas, Options.Canvas.Width, x, y, cX, cY, bitmap.getData(ColorTable), bitmap.getWidth(), srcX, srcY); } } finally { Options.Exit(); } }