private void RenderInternal(HandleRef refTargetDC, BufferedGraphics buffer)
        {
            IntPtr sourceDC = buffer.Graphics.GetHdc();

            try {
                SafeNativeMethods.BitBlt(refTargetDC, targetLoc.X, targetLoc.Y, virtualSize.Width, virtualSize.Height,
                                         new HandleRef(buffer.Graphics, sourceDC), 0, 0, rop);
            }
            finally {
                buffer.Graphics.ReleaseHdcInternal(sourceDC);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Internal method that renders the specified buffer into the target.
        /// </summary>
        private void RenderInternal(HandleRef refTargetDC)
        {
            IntPtr sourceDC = Graphics.GetHdc();

            try
            {
                SafeNativeMethods.BitBlt(refTargetDC, _targetLoc.X, _targetLoc.Y, _virtualSize.Width, _virtualSize.Height,
                                         new HandleRef(Graphics, sourceDC), 0, 0, RasterOp);
            }
            finally
            {
                Graphics.ReleaseHdcInternal(sourceDC);
            }
        }