/*
* GDI32 Bitblt
*/
public static class GDI
{
[System.Runtime.InteropServices.DllImport("gdi32.dll")]
internal static extern int BitBlt (
IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight,
IntPtr hdcSrc, int nXSrc, int nYSrc, int dwRop);
}
/* (Does not work with HdcSrc by some reason) BITBLT.
*/
IntPtr HdcDst = e.Graphics.GetHdc();
if (HdcDst != null)
{
IntPtr HdcSrc = RenderSurfaceCanvas.GetHdc();
if (HdcSrc != null)
{
//GDI.BitBlt(HdcDst, e.ClipRectangle.Left, e.ClipRectangle.Top, e.ClipRectangle.Width, e.ClipRectangle.Height, HdcSrc, 0, 0, 0xCC0020);
GDI.BitBlt(HdcDst, 0, 0, 50, 50, HdcSrc, 0, 0, 0x00CC0020);
//GDI.BitBlt(HdcDst, 10, 10, 260, 60, HdcSrc, 30, 100, 0xFF0062);
RenderSurfaceCanvas.ReleaseHdc(HdcSrc);
}
e.Graphics.ReleaseHdc(HdcDst);
}