internal static void Render(this BufferedGraphics source, Graphics target, Rectangle clientRectangle, GdiRasterOps rasterOp ) { source.Render(target, clientRectangle.Location, clientRectangle.Size, rasterOp); }
internal static void Render(this BufferedGraphics source, Graphics target, Point scrollPosition, Size virtualSize, GdiRasterOps rasterOp ) { if (target != null) { var targetDC = target.GetHdc(); try { source.RenderInternal(new HandleRef(target, targetDC), scrollPosition, virtualSize, rasterOp); } finally { target.ReleaseHdc(targetDC); } } }
private static void RenderInternal(this BufferedGraphics source, HandleRef targetDC, Point scrollPosition, Size virtualSize, GdiRasterOps rasterOp ) { var sourceDC = source.Graphics.GetHdc(); try { NativeMethods.BitBlt( targetDC, scrollPosition.X, scrollPosition.Y, virtualSize.Width, virtualSize.Height, new HandleRef(source.Graphics, sourceDC), 0, 0, (int)rasterOp); } finally { source.Graphics.ReleaseHdc(sourceDC); } }