基线 SVN r240

SVN-Revision: r240
This commit is contained in:
cyf
2025-02-06 06:46:06 +00:00
commit ab56a9bcf7
5317 changed files with 902274 additions and 0 deletions
@@ -0,0 +1,21 @@
using System;
using System.Runtime.InteropServices;
namespace MiniBlinkPinvoke.Core
{
public static class GraphicsWrapper
{
[DllImport("gdi32.dll")]
private static extern bool BitBlt(IntPtr hdc, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, uint dwRop);
public static bool CopyTo(this System.Drawing.Graphics gr1, System.Drawing.Graphics gr2, System.Drawing.Rectangle rect)
{
bool result = false;
var graaa1 = gr2.GetHdc();
var graaa2 = gr1.GetHdc();
result = BitBlt(graaa1, rect.X, rect.Y, rect.Width, rect.Height, graaa2, rect.X, rect.Y, 0x00CC0020);
gr1.ReleaseHdc(graaa2);
gr2.ReleaseHdc(graaa1);
return result;
}
}
}